Refresh DNS
DNS (Domain Name System) is a system in a computer that stores and associates results and information relevant to a specific web address in a cache. The purpose of this is to speed up the recovery of the said information the next time the user accesses the website. However, if the DNS information of a website has changed, then the information stored in a computer’s DNS cache will have to be updated as well, or else the user will encounter problems when trying to access the website. This can be achieved by flushing or refreshing the DNS cache. Through this, the old and outdated information of a web address will be removed from the computer’s DNS cache, and the updated DNS information will be stored in its place.
Contents
Steps
Refresh DNS for Microsoft Windows
- Open a command prompt on your computer by clicking on ‘Start’, ‘Run’, and typing ‘cmd’.
- For Vista or Windows 7, the process will have to be done differently: Click on ‘Start’ --> ‘All Programs’ --> ‘Accessories’. Right-click on ‘Command Prompt’. Select ‘Run as Administrator’.
- Type the following within the command prompt: ipconfig /flushdns.
- Wait for the message to appear:
- Windows IP Configuration
- Successfully flushed the DNS Resolver Cache.
Refresh DNS for Mac OS
- Open a local window.
- Type the following within the prompt: lookupd -flushcache.
Refresh DNS for Mac OS Leopard or newer
- Open a local window.
- Type the following within the prompt: dnscacheutil –flushcache.
Refresh DNS for Linux
- Restart the
nscd
daemon, which manages the DNS cache.- On distributions that use upstart, such as Debian and Ubuntu: sudo /etc/rc.d/init.d/nscd restart
- On distributions that use system, such as Arch Linux and Fedora, type in sudo systemctl restart nscd.service
Tips
- You can wait for up to 24 hours for a negative DNS entry to be flushed from a cache automatically.
- In Windows, you can also modify your registry to alter the length of time that an entry is stored in the DNS cache. Go to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters registry key.
- Under MaxCacheTtl, you can edit the maximum time (in seconds) that the results of a DNS lookup will be stored in the cache. The default value for this field is 86,400 seconds or 24 hours.
- Under MaxNegativeCacheTtl, you can edit the maximum time (in seconds) that the results of a negative or bad DNS lookup will be stored in the cache. The default value for this field is 900 seconds or 15 minutes.
Related Articles
- Flush DNS
- Display the Contents of Your DNS Cache
- Fix Common Computer Network Issues
- Refresh Your IP Address on a Windows Computer