How to Flush DNS
Domain Name System (DNS) is an Internet Engineering Task Force (IETF) standard name service that allows your computer to register and resolve domain names. These names are what are used to access resources on the Internet. When you visit a website for the very first time, your computer stores the website’s DNS information. On subsequent visits, the computer will look at its cache to determine if the information that was stored is present so that it can use it. This helps to speed up DNS resolution if multiple lookups are done to the same address. However, if the information has changed, or there are problems with the network or the DNS server then this could result in problems.
Flushing DNS removes and resets the stored information of the DNS client resolver cache thereby forcing it to find new DNS information for that site. This will discard any negative DNS cache entries.
The DNS cache does not recognize bad entries and will store both negative and positive entries. Negative entries occur when the DNS resolver fails and you are not able to connect to the intended site. When the website becomes fine, the computer will give you a DNS error since the bad entry had already been cached. You will then need to flush the DNS because a bad entry was reserved.
When an Internet address is cached, it stored for up to 24 hours. If the IP address for a certain website changes before the 24 hours are over, the DNS cache will give you an error message when you try to connect. Or if you receive a negative response from a certain address that is busy or congested, you will be unable to connect to that site for the next 5 minutes. You will need to flush your cache to resolve these problems.
To flush the DNS cache in Microsoft Windows
1. Go to start
2. Open the command prompt ( click on Run and type cmd)
3. Once open, type ipconfig/flushdns and press Enter
NOTE: You can view the DNS resolver cache by typing ipconfig /displaydns command in the command prompt.
You could also decide to stop the cache or disable it permanently if you keep experiencing negative entries in your DNS. You can turn off DNS caching by running the following commands in your command prompt in Windows:
net stop dnscache
OR
sc servername stop dnscache
However, this will only stop the DNS cache up to the next time you start your machine. To disable caching permanently, you will need to use the Services tool to set the DNS Client service startup type to Disabled. You do this by:
1. Go to start
2. Click on control panel
3. Click on Administrative tools
4. Click on services
5. Look for DNS client. the name of the service may also appear as Dnscache.
6. In the properties, under start up type, click on disabled.
To flush the DNS cache in Linux/UNIX:
1. Open your terminal
2. Restart the nscd daemon by typing /etc/rc.d/init.d/nscd restart in your terminal. The ncsd daemon is what controls the DNS cache.
To flush the DNS cache in Mac OS X:-
1. Open your terminal
2. Type lookupd -flushcache
For more information on How to Flush DNS read How do I flush DNS
