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"



Share this page:

Was this article useful? Have any suggestions or improvements to the information?

Also Read

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

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

It can often take up to 72 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...

What is domain propagation?

Once you make changes to your domain with the registrar you purchased your domain from, the...

Redirecting non-www to www with .htaccess

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