How To Flush DNS
Most DNS clients cache the results of name resolution requests. This means that the DNS clients will temporarily store the website names that you have been visiting lately. This process speeds up name resolution if multiple lookups are done to the same address, such as is common when browsing the web. So, if you visit Google.com the second time, the DNS client will already have the name mapped and hence will retrieve the mapping quickly.
Sometimes a bad DNS entry will be cached and you will need to either flush the DNS cache to get rid of it, or wait up to 24 hours – 2 weeks for it to be dropped from the cache automatically.
Given below is a comprehensive step-by-step process to flush the DNS.
How to Flush DNS in Microsoft Windows
In Microsoft Windows, you can use the command ipconfig /flushdns to flush the DNS resolver cache. Open the command prompt and type the following:
C:>ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
The above command will completely flush the DNS, deleting any incorrect entries too. You can also use the command ipconfig /displaydns to view the DNS resolver cache.
Flush DNS in Mac OSX
In Mac OSX Leopard, you can use the command dscacheutil -flushcache to flush the DNS resolver cache:
bash-2.05a$ dscacheutil -flushcache
In Mac OSX versions 10.5.1 and before, the command lookupd -flushcache performed the same task:
bash-2.05a$ lookupd -flushcache
Flush DNS in Linux
In Linux, the nscd daemon manages the DNS cache. To flush the DNS cache, restart the nscd daemon. To restart the nscd daemon, use the command /etc/init.d/nscd restart`.
