• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Geek's Advice

IT News, Software Reviews, How To's & Computer Help

  • News
  • Reviews
  • Removal guides
  • Fix
  • Tutorials
  • Forum
  • ASK A GEEK

Flush DNS Cache (2021 How-To Guide)

January 5, 2021 By Matt Corey 7 Comments

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

Contents

    • Guide to Flush DNS on Windows, Mac, Linux, Ubuntu, Google Chrome
  • Flush DNS Cache on Microsoft Windows
    • Windows 10
    • Windows 8 / Windows 8.1
    • Windows Vista / Windows 7
    • Windows XP / 2000 / NT / 98
  • Flush DNS Cache on Mac OS
    • MacOS 10.15: Catalina
    • MacOS 10.14: Mojave
    • MacOS 10.13: High Sierra
    • MacOS 10.12: Sierra
    • Mac OS X 10.11: El Capitan
    • Mac OS X 10.10: Yosemite
    • Mac OS X 10.9: Mavericks
    • Mac OS X 10.8: Mountain Lion
    • Mac OS X 10.7: Lion
    • Mac OS X 10.6: Snow Leopard and older versions
  • Clear DNS Cache on Linux or Ubuntu
    • Linux
    • Ubuntu
  • Bonus: Flush DNS on 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.
how to flush dns
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.
flush dns on windows 10 guide
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

flush dns on mac os x
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.
open terminal in mac first method
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 via mac to flush dns
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.
mac os flush dns command in 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.
Mac OS X Yosemite flush DNS command
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 flushing dns
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.
    flush dns on ubuntu step 1
  3. Now, type sudo /etc/init.d/networking force-reload and press Enter.
    flush dns on ubuntu step 2

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.
    flush dns in chrome

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.

Matt Corey Geeks Advice
Matt Corey

Matt Corey is passionate about the latest tech news, gadgets and everything IT. Matt loves to criticize Windows and help people solve problems related to this operating system. When he’s not tinkering around with new gadgets he orders, he enjoys skydiving, as it is his favorite way to clear his mind and relax.

Related posts:

  1. Fix DNS Server isn’t responding Error on Windows (2023 Guide) DNS Server isn’t responding error leads to no Internet connectionContentsDNS...

Filed Under: Tutorials Tagged With: dns

Reader Interactions

Comments

  1. nhamandevo says

    November 27, 2020 at 10:20 am

    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!

    Reply
  2. coco says

    April 22, 2020 at 2:37 pm

    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

    Reply
  3. Gary says

    March 6, 2020 at 12:30 pm

    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.

    Reply
  4. col says

    December 4, 2019 at 9:11 pm

    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.

    Reply
  5. BVK says

    November 2, 2019 at 8:14 am

    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.”

    Reply
  6. Norbert Webb says

    October 4, 2019 at 6:48 pm

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

    Reply
  7. Rosemarie says

    October 4, 2019 at 6:39 pm

    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.

    Reply

Leave a Reply Cancel reply

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

Primary Sidebar

SEARCH OUR SITE

Trending

decrypt files locked by stop djvu ransomware virus

Decrypt Files Locked by STOP/DJVU Ransomware (Updated 2023 Guide)

Some STOP/DJVU ransomware victims can decrypt or … [Read More...] about Decrypt Files Locked by STOP/DJVU Ransomware (Updated 2023 Guide)

Remove STOP/DJVU Ransomware Virus (2023 Guide)

STOP/DJVU in 2023: more than 690 versions, latest … [Read More...] about Remove STOP/DJVU Ransomware Virus (2023 Guide)

Remove Segurazo Antivirus (SAntivirus Removal Guide 2023)

Segurazo review: is it a virus? Segurazo … [Read More...] about Remove Segurazo Antivirus (SAntivirus Removal Guide 2023)

easy ways to fix dns_probe_finished_nxdomain error on windows, mac, android, chromebook

Fix DNS_PROBE_FINISHED_NXDOMAIN Error (Windows, Mac, Android, Chromebook)

DNS_PROBE_FINISHED_NXDOMAIN error … [Read More...] about Fix DNS_PROBE_FINISHED_NXDOMAIN Error (Windows, Mac, Android, Chromebook)

POPULAR SOFTWARE REVIEWS

Intego Mac Washing Machine X9 review 2022

Intego Mac Washing Machine X9 Review (2023)

Mac Washing Machine X9 is an essential Mac cleaner that keeps your computer clutter-free Intego … [Read More...] about Intego Mac Washing Machine X9 Review (2023)

Private Internet Access Review

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

Private Internet Access (PIA) VPN maintains its long-term role as a leader Private Internet … [Read More...] about Private Internet Access Review 2023: Fast, Secure & Cheap VPN

restoro review 2020

Restoro Review 2023: Best Windows Repair Tool?

What is Restoro and how it works? Restoro is primarily a PC repair software designed for Windows … [Read More...] about Restoro Review 2023: Best Windows Repair Tool?

OUR EXPERTS RECOMMEND

Comprehensive PC Repair Software

geek's advice recommends restoro pc repair as editors choice
DOWNLOAD NOW
  • Uses Avira engine to remove malware
  • Repairs Virus Damage
  • Fixes Windows Errors & BSOD
  • Replaces Damaged DLLs
  • Repairs Damaged Windows Settings
  • Identifies Hardware Problems

Compatible with Microsoft Windows.

Read Full Review

Robust Mac Antivirus

geek's advice recommends intego mac internet security x9 as editors choice
GET INTEGO
  • 24/7 real-time protection
  • Intelligent firewall
  • Scans emails for malware
  • Scans iOS devices & external drives
  • Excellent malware detection rate
  • Easy-to-use

Compatible with Mac OS X 10.9-13.

Read Full Review

Copyright © 2024 Geeksadvice.com. Any unauthorized copying, redistribution or reproduction of part or all of the site contents in any form is prohibited.

About Us · Terms of Use · Privacy Policy · Contact Us

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkNo