How to Flush DNS Cache?

How to Flush DNS Cache?

How to Flush DNS Cache?

When you’re working on computer and suddenly find issue with browsing your favourite site, you got panic. This issue might be solving with flushing your DNS Cache. So, in this article You’ll learn how to flush DNS and it’s benefits.


Why you need to Do Flush DNS cache Periodically?

Similar to browsers, operating system also saves cache files called Domain Name System (DNS). This file contains all information about all your visited websites – hostnames, Ip address and Resource records.

The caches validity period is determined by TTL (Time to Live). As long as cache files are valid, they will answer without having to go through the DNS server.

Using outdated DNS cache files Can lead to error and Security breach, therefore, we recommend You to flush DNS cache periodically.

Here the Main Reason why you need to Clear DNS cache.

Solve technical Issue — Forcing the OS to Find updated DNS records Can solve connection problem.

Prevent Search Behaviour Tracking – it makes easier to hacker predict your browsing history if you store DNS cache.

Security – DNS spoofing is work on DNS Cache. Which endangers user’s sensitive data like personal data and login credential.


How to Flush DNS Cache?

As per your operating systems steps for Flushing DNS cache may different. This tutorial will show you how to Flush DNS in Microsoft Windows, Linux, And Mac OS X.

Microsoft Windows
  • Press Win + R key together open run and then enter cmd.
  • Type following command to clear your DNS cache from your computer.

Ipconfig /flushdns

  • After complete this process successful you’ll see message as below:

flush DNS Cache in windows


Ubuntu doesn’t cache DNS records. If you use service like nscd (name caching service daemon), the following steps may helpful.

  • Press Ctrl+Alt+T to open terminal.
  • Enter the following command to clear DNS cache

sudo /etc/init.d/nscd restart

Mac os x
  • Press f4 key and enter terminal in the launchpad’s search field.
  • If you using Mac OS Sierra, X El Captain, X Mavericks enter the following Command

sudo killall -HUP mDNSResponder

  • to flush DNS in Mac OS X use the command:

sudo discoveryutill udnsflushcaches


While experiencing issue in connection or seeing incorrect webpages, your system have faulty or outdated DNS cache records. You can easily solve this issue by just Flushing DNS. If problem persist you can clear your browser cache.