How to Clear the DNS Cache?

When you are connecting to the website it will be caching the Domain Name Server i.e. the DNS settings to the machine in website hosting. Here when you are making changes to the DNS, this would prevent you from visiting the website at the new location for quite a period of time until the record is expired where the time taken can be from 3-48 hours, this is applicable when you buy domain name newly. One should note that the ISP can also cache the settings, this will only be effective if the ISP has updated the information as well.

Process to Flush the DNS in Windows

In Windows hosting one needs to use the “ipconfig/flushdns” for flushing the DNS cache. You need to open the command prompt via Start >> Run >> cmd.exe and then you need to type the following:

C:\> ipconfig /flushdns

You should be receiving:

Windows IP configuration
Then you need to successfully flushed the DNS Resolver Cache


Here in the command that is mentioned above will completely be flushing the DNS, this will be deleting the incorrect entries too. You will also be able to use the command ipconfig /displaydns for viewing the DNS resolver cache currently on the machine.

Process of Flushing the DNS in the Mac OSX

In the Mac OSX Leopard, you will be able to use the command “dscacheutil-flushcache” for flushing the DNS cache from the terminal:

bash-2.05a$ dscacheutil -flushcache

In the Mac OSX 10.5.1 version and before, the command lookupd-flushcache will be performing the same task:

bash-2.05a$ lookupd -flushcache

Here the terminal will be found in the applications under the utilities.

Flushing the DNS in the Linux

In the Linux version of hosting, the nscd daemon will be managing the DNS cache. For flushing of the DNS cache, one needs to restart the nscd daemon.

For restarting the nscd daemon, you need to use the following

command `/etc/init.d/nscd restart`.