How to Flush DNS Cache on Windows, Linux and MacOS?

By Potu Snehith

April 1, 2019


A DNS cache is a temporary database maintained by computers operating system. It contains records of all the recent visits and attempted visits to a website and other internet domains. Domain Name System flushing is the mechanism where the user can manually make all the entries in the cache invalid, so your computer re-fetches new combinations by now on whenever it needs and stores in local cache. How to Flush DNS? well, this article helps you to clear DNS on various operating systems.

Why Flush DNS?

Internet depends on DNS to maintain the record of all the public websites and their corresponding IP addresses. DNS is used so that we need not memorize the IP addresses of all the websites.You type in a URL like Fastwebhost.in and your web browser asks your router for the IP address. The router has a DNS server address stored, so it asks the DNS server for the IP address of that host name. The DNS server finds the IP address that belongs to Fastwebhost.in and then it is able to understand what website you're looking for, after which your browser can then load the appropriate page.There are tons of public DNS servers your network can use to try to speed up the conversion/resolution process, it's still quicker to have a local copy of the "phone book," which is where DNS caches come into play.

The DNS cache attempts to speed up the process even more by handling the name resolution of recently visited addresses before the request is sent out to the internet

How to Flush DNS

You can use the following methods  to clear old DNS information to avoid 404 errors :

Windows® 8

Carryout the following steps to flush DNS cache on Windows 8

  1. On your keyboard, type Win+X to open the WinX Menu.

  2. Right-click on Command Prompt and select Run as Administrator.

  3. Run the following command:

ipconfig /flushdns

If  the system returns the following message then the command in successful

Windows IP configuration successfully flushed the DNS Resolver Cache.

Windows® 7

To clear your DNS cache if you use Windows 7, perform the following steps:

  1. Click on Start.

  2. Enter cmd in the Start menu search box.

  3. Right-click on Command Prompt and select Run as Administrator.

  4. Run the following command:

    ipconfig /flushdns

         If the command succeeds, the system returns the following message:

  Windows IP configuration successfully flushed the DNS Resolver Cache.

Windows XP®, 2000, or Vista®

Follow these steps to clear your DNS cache on Windows XP, 2000, or Vista:

  1. Go to Start.

  2. On the Start menu, click Run....

NOTE: If you do not see the Run command on Windows Vista, enter run in the Search bar.

  1. Run the following command in the Run text box:

ipconfig /flushdns

If the system returns the following message, then the command is successful

Successfully flushed the DNS Resolver Cache.

MacOS® 10.10.4 and above

To clear your DNS cache if you use Mac OS X version 10.10.4 or above, execute the following steps:

  1. Click on Applications.

  2. Then click on Utilities.

  3. Go to Terminal.

  4. Run the following command:

sudo killall -HUP mDNSResponder

If the command is successful, the system does not return any output.

âš  Warning:

To run this command, you must know the computer's administrator account password.

MacOS 10.5 and 10.6

To clear your DNS cache if you are using a  MacOS X version 10.5 or 10.6, complete the following steps:

  1. Click on Applications.

  2. Go to Utilities.

  3. Double-click on Terminal.

  4. Run the following command:

sudo dscacheutil -flushcache

If the command succeeds, the system does not return any output.

âš  Warning:

To run this command, you must know the computer's administrator account password.

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Create a website in 3 simple steps

Choose a website template, add features, then customise! - Free Online Website builder.