Tutorials

Flush DNS Cache (2021 How-To Guide)

Guide to Flush DNS on Windows, Mac, Linux, Ubuntu, Google Chrome

Flush DNS is a command which helps to clear outdated or corrupted DNS resolver cache. It is commonly used along with IP release and renew commands to fix network connectivity related issues. As your computer automatically caches IPs and other DNS results to make subsequent requests to the same hostname faster, it might also cache some old or bad results. As a consequence, you might not be able to communicate with hosts properly. In fact, it is one of the best methods to solve INET_E_RESOURCE_NOT_FOUND error.

No matter what operating system (Windows, Linux, Mac, Ubuntu) or browser you use, you can manually speed up the process and clear DNS Cache using simple steps provided below. To make the navigation easier, use Table of Contents to jump to guide for your operating system version.

Related: How to Release & Renew IP Address on Windows, Mac, Linux?

The following instructions explain how to flush DNS on these operating systems:

  • Windows 10, 8.1, 8, 7, Vista, 2000, NT, XP, 98;
  • MacOS versions from 10.6 (Snow Leopard) to 10.15 (Catalina);
  • Linux;
  • Ubuntu;
  • Chrome.
The method helps to solve various DNS-related issues.

Flush DNS Cache on Microsoft Windows

Windows 10

Flush DNS on Windows 10 is a simple command that needs to be entered in Windows Command Processor, better known as Command Prompt (CMD). You must, however, open CMD with Administrator’s privileges. Here’s what you need to do.

  1. In Windows 10, use Windows search and type Command Prompt.
  2. Right-click Command Prompt and choose Run as Administrator.
  3. In User Account Control pop-up, click Yes.
  4. In CMD, type ipconfig /flushdns and press Enter.
Follow these easy steps to complete the task on Windows 10.

Windows 8 / Windows 8.1

To flush DNS on Windows 8 or 8.1, ensure to use Command Prompt with Admin’s privileges. Follow these steps to clear your DNS cache.

  1. In Windows 8/8.1, use Windows search and type Command Prompt.
  2. Right-click Command Prompt and choose Run as Administrator.
  3. In User Account Control pop-up, click Yes.
  4. In CMD, type ipconfig /flushdns and press Enter.

Windows Vista / Windows 7

In order to flush DNS cache on Windows 7, you need to open Command Prompt as Administrator. Here’s how.

  1. Click on Start > All Programs > Accessories and find Command Prompt.
  2. Right-click Command Prompt and choose Run as Administrator.
  3. In CMD, type ipconfig /flushdns and press Enter.

Windows XP / 2000 / NT / 98

If you’re looking on how to clear DNS cache on older Windows versions, look no further. All you need to do is:

  1. Click on Start > Run > cmd.exe > OK.
  2. Type ipconfig /flushdns and press Enter.

Flush DNS Cache on Mac OS

Flushing DNS on Mac is easy.

To clear DNS Cache on Mac OS X systems, follow the guidelines given below. Please pay attention to the commands shown for different Mac OS versions – not all of them are the same for every OS.

MacOS 10.15: Catalina

To flush DNS on MacOS Catalina, follow these steps.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal)
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.
First Method to open Terminal in Mac.

MacOS 10.14: Mojave

Clearing DNS on MacOS Mojave is a quick and easy procedure if you follow these steps.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

MacOS 10.13: High Sierra

Flushing DNS on MacOS High Sierra can be done by following these guidelines.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.
Second method to open terminal on Mac.

MacOS 10.12: Sierra

If you want to flush DNS on MacOS Sierra, follow these directions.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.
This command flushes DNS cache in the majority of Mac OS X systems except Yosemite, Lion and previous versions.

Mac OS X 10.11: El Capitan

To flush DNS on MacOS X El Capitan, follow these steps.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Mac OS X 10.10: Yosemite

In order to flush DNS on MacOS X Yosemite, carry out these steps.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo discoveryutil udnsflushcaches and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.
This command clears the cache for most Yosemite OS X.

Mac OS X 10.9: Mavericks

To flush DNS on MacOS X Mavericks, follow these steps.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Mac OS X 10.8: Mountain Lion

To clear DNS cache on MacOS X Mountain Lion, complete given instructions.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Mac OS X 10.7: Lion

To flush DNS on MacOS X Lion, follow these steps.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Mac OS X 10.6: Snow Leopard and older versions

To flush DNS on MacOS X Lion, follow these steps.

  1. Open Terminal (Application Utilities Terminal or click Go > Utilities > Terminal).
  2. Type sudo lookupd -flushcache and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Clear DNS Cache on Linux or Ubuntu

Linux

  1. Launch Terminal by pressing Ctrl + Alt + T.
  2. Linux offers various commands for DNS flushing. Here are they:
  3. To clear nscd DNS cache: sudo /etc/init.d/nscd restart;
  4. To clear dnsmasq DNS cache: sudo /etc/init.d/dnsmasq restart;
  5. To clear BIND DNS cache, use one of the given commands:
    1. sudo /etc/init.d/named restart;
    2. sudo rndc restart;
    3. sudo rndc exec.
Linux commands for clearing domain name system cache.

Ubuntu

  1. Launch Terminal by pressing Ctrl + Alt + T.
  2. Type the following command: sudo /etc/init.d/dns-clean restart and press Enter.
  3. Now, type sudo /etc/init.d/networking force-reload and press Enter.

Bonus: Flush DNS on Google Chrome

Google Chrome browser has an in-built caching system. In order to clear DNS cache from Chrome, complete these steps.

  1. Open Chrome browser. Copy and paste the following line into the Chrome address bar, then press Enter.

    chrome://net-internals/#dns

  2. Click Clear host cache.
  3. Now click on Sockets.
  4. Click Flush socket pools.

If you want to clear DNS cache on browsers like Firefox or Safari, we suggest resetting them.

That’s it! We hope that our guide on how to flush DNS on Windows, Mac, Linux, Ubuntu or Chrome helped you to solve the problem.

This post was originally published on August 22, 2019 and updated on January 5, 2021.

View Comments

  • Valeu! Passei noites sem dormir tentando recuperar o meu site, mas sempre há gente boazinha que não usa a internet para desinformar.
    Muita forca!

  • Mac Catalina I had to do both
    dscacheutil -flushcache
    sudo killall -HUP mDNSResponder;

    you can check with
    dscacheutil -q host -a name [example domain name]
    to see if your dns changes

  • The Win 10 cmd prompt solution didn't solve the INET_E_RESOURCE_NOT_FOUND error and the Chrome browser solution doesn't work either. Having recently upgraded to Win 10 and never having had this problem before, it's clear that my problem lies with the OS. Win 10 really is a dreadful pile of rubbish.

  • There's something missing when I try to do the above on my Ubuntu.

    It just keeps saying "command not found" for all of them.

  • Chrome net-internals have been removed in chrome. "The net-internals events viewer and related functionality has been removed. Please use chrome://net-export to save netlogs and the external catapult netlog_viewer to view them."

  • Hello, dear Rosemarie. Yes, to execute a command, you need to press Enter after typing the password. Updated the tutorial to clarify it.

  • I"m trying to do this for Mac El Capitan. After you enter you password, do you hit enter or are you done without hitting enter? Do you just enter you password and close? Please clarify. Thanks.

Recent Posts

Private Internet Access Review 2022: Fast, Secure & Cheap VPN

Private Internet Access (PIA) VPN maintains its long-term role as a leader Private Internet Access…

1 day ago

Remove XCBG Ransomware Virus (DECRYPT .xcbg FILES)

XCBG ransomware aims to lock your files and demand a ransom XCBG ransomware is a…

2 days ago

Remove BPQD Ransomware Virus (DECRYPT .bpqd FILES)

BPQD ransomware encrypts all computer files, demands a ransom from the user BPQD ransomware is…

2 days ago

Remove KQGS Ransomware Virus (DECRYPT .kqgs FILES)

KQGS ransomware is a hostile computer virus designed to encrypt all of your files KQGS…

3 days ago

Remove VTYM Ransomware Virus (DECRYPT .vtym FILES)

VTYM ransomware description: a virtual menace to your files stored on the computer VTYM ransomware…

1 week ago

Remove FOPA Ransomware Virus (DECRYPT .fopa FILES)

FOPA ransomware is a new threatening computer virus that encrypts your files FOPA ransomware virus…

1 week ago