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

service nscd restart

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

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

rndc exec

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


and click "Clear Host Cache"



  • 128 Users Found This Useful

Was this answer helpful?

Related Articles

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

What is domain propagation?

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

What is a domain name pointer or parked domain?

Do you want to have multiple domain names point to your website? With a domain name pointer,...

DNS Report Tools

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

Redirecting non-www to www with htaccess

Redirecting non-www to www with .htaccessIf you ever point your www. record to another server...