How to flush dns cache

Most of your computer systems 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. Hence, if you visit mistercertified.com second time, the system will already have the name mapped and hence will retrieve the mapping (DNS) 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 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.

Turning Off DNS Caching under Microsoft Windows (Advanced users)

If you experience frequent issues with DNS caching under Microsoft Windows, you can disable client-side DNS caching with either of these two commands:

net stop dnscache
sc servername stop dnscache

This will disable DNS caching until the next reboot. To make the change permanent, use the Service Controller tool or the Services tool to set the DNS Client service startup type to Disabled. You can permanently disable DNS Client by following the below steps:

  • Goto Start and click on Run.
  • Type Services.msc in the Run command box.
  • A window listing all the services will popup. Search for a service called DNS Client.
  • Double click on the listed DNS Client service and click Stop. Similarly, you can restart it by clicking Start.

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`.

Hope this article helps to resolve DNS cache problems.

Was this answer helpful?

 Print this Article

Also Read

How do I perform a Traceroute, whois, ping, and dig?

Traceroute, whois, ping, and dig. The traceroute, whois, ping, and dig tools are very...

How do I know when my domain's DNS has resolved or propagated?

If your domain DNS propagation completed then you can see your site default page with...

How can I find my domain current name servers (DNS ) info?

Finding domain contact details and DNS info is called WHOIS search. Many domain registrars...

Can I upload files to my web hosting account before the DNS resolves?

You can upload files through FTP when your domain under propagation also. You need to use server...