In this tutorial we explain how you can flush DNS cache.

What is DNS cache?

DNS cache is cache which stores the IP address and DNS records (A record, MX record etc) which helps to speed up the domain to IP mapping process.

When a website is browsed through a web browser (Chrome, Firefox, Safari etc.) or when you try to access mails via an email client (Thunderbird, Outlook etc.), your computer looks into the cache and the hosts file before looking into the DNS server.

Sometimes old IPs or DNS records are cached in the computer which leads to loading it from the old IP address whenever the domain is accessed. This happens often when an IP of the website is changed or when the website is migrated to a new server.

In such scenarios, the two things that you should do is to clear your browser and DNS cache. In this tutorial, we will show you how to clear DNS cache in Windows, Linux and Mac Operating Systems.

Flush DNS cache in Windows

  • Open up a command prompt by going to Start >> Run >> cmd.exe
  • In the command prompt (black screen), type ipconfig /flushdns and press Enter


You should see the line “Successully flushed the DNS Resolver Cache” in the result.

Flush DNS cache in Linux

  • Open up a terminal by typing Alt+Ctrl+T
  • In the terminal, type the command /etc/init.d/nscd restart if you are logged in as root user or run the command sudo /etc/init.d/nscd restart


In the result you see ‘Restarting Name Service Cache Daemon nscd  [ OK ]’.

Flush DNS cache in Mac OS

  • Open a terminal window by going to Applications >> Utilities >> Terminal
  • In the terminal, type lookupd -flushcache and hit ‘return’.


After clearing the DNS cache, you have to restart web browser or email client or any other application you are running which has the old DNS record/IP.

If the issue persists, it might be ISP cache or something else causing the issue, in this case, feel free to contact our 24/7 support.

Useful Resources:

We hope you found this tutorial useful on how to flush DNS on cache in Linux.
Thanks for reading and leave your questions below to keep the conversation going.

Leave a Reply

Your email address will not be published.