How To Flush your DNS Cache

Did you know your computer has DNS cache which stores stores the locations (IP addresses) of web servers hosting websites you’ve previously visited?

If the IP address of the web server changes before the entry in your computer’s DNS cache updates, you may find you’re no longer able to access the site, or you may be viewing the site from an old server.

To fix this, you just need to flush your DNS cache.

How to clear your DNS cache Using Windows

Windows 10

Flushing the DNS cache on Windows 10 is very easy, however you will need to be an Administrator on the computer which you’re using to flush the cache. To properly flush the DNS Cache in Windows 10, you must ensure that you run the command prompt as an administrator user.

  1. Ensure that you’re on the Windows 10 desktop and logged in.
  2. Right click on the start menu and choose Command Prompt (Admin) or Windows Powershell (Admin) from the menu.
  3. Type in the command below and press enter or return on your keyboard.

ipconfig /flushdns

If the command was entered successfully, the system will return the following message:

Windows IP configuration successfully flushed the DNS Resolver Cache.

Running an older version of Windows, click to expand:

Windows 8

Click to Expand

To clear your DNS cache on Windows 8, perform the following steps:

  1. On your keyboard, press Win+X to open the WinX Menu.
  2. Right-click Command Prompt and select Run as Administrator.
  3. Run the following command:

ipconfig /flushdns

If the command was entered successfully, the system will return the following message:

Windows IP configuration successfully flushed the DNS Resolver Cache.

Windows 7

Click to Expand

In Windows 7, you can clear your cache using the following instructions:

  1. Click Start.
  2. Enter cmd in the Start menu search text box.
  3. Right-click Command Prompt and select Run as Administrator.
  4. Run the following command:

ipconfig /flushdns

If the command was entered successfully, the system will return the following message:

Windows IP configuration successfully flushed the DNS Resolver Cache.

How to clear your DNS cache in MacOS

Apple has made numerous revisions to it’s OS X, now macOS, Operating System. Over time, the method with which you can clear your DNS cache has changed depending on the version of macOS. To clear the DNS cache on your Mac, use list below to locate the version of macOS you are running and follow the instructions.

Mac OS X® 13 (High Sierra) to current version (2020, Big Sur)

To clear your DNS cache in Mac OS X version 11 (El Capitan) and 12 (Sierra), perform the following steps:

  1. Click Applications.
  2. Click Utilities.
  3. Click Terminal.
  4. Run the following command:

sudo killall -HUP MDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache

Note: This command is case sensitive. You will also be asked to authenticate with your User Password as you are using the “sudo” command. You will need to be an Administrator to perform this function.

Running an older version of MacOS?

Not to worry! Find your version below and expand the section to see how to clear the DNS cache on your computer.

Mac OS X® 10.4 (Tiger)
Click to Expand

To clear your DNS cache in Mac OS X version 10.4 Tiger, perform the following steps:

  1. Open your Applications Folder.
  2. Open the Utilities Folder.
  3. Open the application called “Terminal”.
  4. Run the following command:

lookupd -flushcache

Mac OS X® 10.5 (Leopard) thru 10.6 (Snow Leopard)
Click to Expand

To clear your DNS cache in Mac OS X version 10.5 (Leopard) thru 10.6 (Snow Leopard), perform the following steps:

  1. Click Applications.
  2. Click Utilities.
  3. Click Terminal.
  4. Run the following command:

dscacheutil -flushcache

Mac OS X® 10.7 (Lion) thru 10.8 (Mountain Lion)
Click to Expand

To clear your DNS cache in Mac OS X version 10.7 (Lion) thru 10.8 (Mountain Lion), perform the following steps:

  1. Click Applications.
  2. Click Utilities.
  3. Click Terminal.
  4. Run the following command:

sudo killall -HUP mDNSResponder

Note: This command is case sensitive. You will also be asked to authenticate with your User Password as you are using the “sudo” command. You will need to be an Administrator to perform this function.

Mac OS X® 10.9 (Mavericks)
Click to Expand

To clear your DNS cache in Mac OS X version 10.9 (Mavericks), perform the following steps:

  1. Click Applications.
  2. Click Utilities.
  3. Click Terminal.
  4. Run the following command:

dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Note: This command is case sensitive. You will also be asked to authenticate with your User Password as you are using the “sudo” command. You will need to be an Administrator to perform this function.

Mac OS X® 10.10.1, 10.10.2, and 10.10.3 (Yosemite)
Click to Expand

To clear your DNS cache in Mac OS X version 10.10.1, 10.10.2, or 10.10.3 (Yosemite), perform the following steps:

  1. Click Applications.
  2. Click Utilities.
  3. Click Terminal.
  4. Run the following command:

sudo discoveryutil udnsflushcaches

Note: You will also be asked to authenticate with your User Password as you are using the “sudo” command. You will need to be an Administrator to perform this function.

Mac OS X® 10.10.4 (Yosemite’s final build version)
Click to Expand

To clear your DNS cache in Mac OS X version 10.10.4 (Yosemite), perform the following steps:

  1. Click Applications.
  2. Click Utilities.
  3. Click Terminal.
  4. Run the following command:

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

Note: This command is case sensitive. You will also be asked to authenticate with your User Password as you are using the “sudo” command. You will need to be an Administrator to perform this function.

Mac OS X® 11 (El Capitan) and 12 (Sierra)
Click to Expand

To clear your DNS cache in Mac OS X version 11 (El Capitan) and 12 (Sierra), perform the following steps:

  1. Click Applications.
  2. Click Utilities.
  3. Click Terminal.
  4. Run the following command:

sudo killall -HUP mDNSResponder

Note: This command is case sensitive. You will also be asked to authenticate with your User Password as you are using the “sudo” command. You will need to be an Administrator to perform this function.

 

How to clear your DNS cache Using Linux

  1. Open the terminal. Open the terminal as root, or enter sudo before entering the DNS flush command.
  2. Restart the service network-manager. In the terminal, enter service network-manager restart and press Enter.

Note: This command is case sensitive. You will also be asked to authenticate with your User Password as you are using the “sudo” command. You will need to be an Administrator to perform this function.

This will flush your DNS Cache.

That’s it! Now you know how to flush your DNS cache.

 

Updated on August 6, 2020

Was this article helpful?

Related Articles

Need help?
We're always here for you. Submit a ticket or Chat with a live person.
Submit Ticket

Leave a Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.