Clearing DNS Cache

When changing hosting providers or making DNS changes you may want to speed up the process of updating the domain resolution to the new IP address. 



If running Windows, open a command prompt with administrative rights by clicking run, type "cmd" and right click and select run as administrator. Once loaded type "ipconfig /flushdns" and hit the enter key.


To restart DNS cache on OS X performing the following base on the version you are using:

OS X Yosemite

Use the following Terminal command to reset the DNS cache in OS X Yosemite v10.10.4:

sudo killall -HUP mDNSResponder

Use the following Terminal command to reset the DNS cache in OS X Yosemite v10.10 through v10.10.3:

sudo discoveryutil mdnsflushcache


OS X Mavericks, Mountain Lion, and Lion

Use the following Terminal command to reset the DNS cache:

sudo killall -HUP mDNSResponder

Mac OS X v10.6

Use the following Terminal command to reset the DNS cache:

sudo dscacheutil -flushcache

 

For Linux it depends on what you have installed. 

Flush nscd dns cache

Nscd caches libc-issued requests to the Name Service. If retrieving NSS data is fairly expensive, nscd is able to speed up consecutive access to the same data dramatically and increase overall system performance. Just restart nscd:
sudo /etc/init.d/nscd restart

OR
service nscd restart

OR
service nscd reload

This daemon provides a cache for the most common name service requests. The default configuration file, /etc/nscd.conf, determines the behavior of the cache daemon.


Flush dnsmasq dns cache

dnsmasq is a lightweight DNS, TFTP and DHCP server. It is intended to provide coupled DNS and DHCP service to a LAN. Dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server. This software is also installed many cheap routers to cache dns queries. Just restart the dnsmasq service to flush out dns cache:
sudo /etc/init.d/dnsmasq restart

OR
service dnsmasq restart


Flush caching BIND server dns cache

A caching BIND server obtains information from another server (a Zone Master) in response to a host query and then saves (caches) the data locally. All you have to do is restart bind to clear its cache:
/etc/init.d/named restart

You can also use rndc command as follows flush out all cache:
rndc restart

OR
rndc exec


To clear DNS cache in Chrome enter the following URL in your Chrome browser:

chrome://net-internals/#dns

and click "Clear Host Cache"



 

 

  • 130 Users Found This Useful

Was this answer helpful?

Related Articles

DNS Report Tools

To track down DNS related issues there are many websites available to assist you in isolated...

I am having problems with my current registrar transferring the domain to you

If you have unlocked the domain with the current registrar, clicked on the confirmation link in...

What is domain propagation?

Domain propagation is the process of updating all of the DNS servers around the world with the...

I changed the DNS pointers to your servers but still can't see my site

It can often take up to 48 hours for the DNS zone transfers to replicate to some ISPs and for...

How do I transfer my domain hosting to Ultra Web Hosting?

You will need to go to your registrar (where you registered your domain name) and modify the...