PDF download Download Article
Clear your DNS cache to resolve website errors
PDF download Download Article

Are you having trouble accessing certain websites? Try flushing your DNS cache! If the IP address of a website you've recently visited has changed since the last time you accessed it in your browser, you might see a "Page not found" error until your DNS resolver cache is cleared. While this cache (which is different from your web browser's cache) also clears automatically, doing a manual DNS flush will instantly clear those old stored addresses, which may restore your access to your favorite website. This wikiHow guide will show you the easiest ways to flush your DNS cache on a Windows or Linux PC, Mac, and Chromebook.

Flushing Your DNS

Flush Chrome's DNS by typing chrome://net-internals/#dns in the address bar and hitting enter. In Windows, use the command ipconfig /flushdns. Restarting your computer also flushes your DNS automatically.

Method 1
Method 1 of 4:

Windows

PDF download Download Article
  1. The easiest way to open Command Prompt with elevated access is:[1]
    • Press the Windows key on your keyboard and type cmd.
    • Right-click Command Prompt in the search results.
    • Click Run as administrator.
    • Click Yes to confirm.
  2. This immediately flushes your PC's DNS cache.[2]
    • If you just want to see the contents of your DNS cache without flushing it, run the command ipconfig /displaydns instead. This command also displays entries from your hosts file.
    • If your PC is a part of an Active Directory network, you may also need to run the command ipconfig /registerdns if you can't resolve other hostnames on your network.
    • If you're still having trouble accessing websites after clearing your DNS cache, you may also need to clear your browser cache.
  3. Advertisement
Method 2
Method 2 of 4:

Mac

PDF download Download Article
  1. There are two easy ways to open Terminal on your Mac:
    • Open Finder, click the Go menu, select Utilities, and then select Terminal.[3]
    • Click the Spotlight icon (the magnifying glass) at the top-right corner of your desktop, type terminal, and then double-click Terminal.
      • You can also press Command+Space to open Spotlight.
  2. The command you'll need to type depends on your version of macOS:[4]
    • Big Sur (macOS 11) and later:
      • sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
    • El Capitan, Sierra, High Sierra, Mojave, & Catalina:
      • sudo killall -HUP mDNSResponder
    • Yosemite:
      • sudo discoveryutil udnsflushcaches
    • Lion, Mountain Lion, & Mavericks:
      • sudo killall -HUP mDNSResponder
  3. This clears your Mac's DNS cache.
    • If prompted, enter your password to run the command. This will be the password you enter when logging in to your Mac. Terminal won't show your keystrokes as you type, but it will detect them.
    • If you're still having trouble accessing websites, check out our guide to fixing common computer network issues. You can also try resetting your network.[5]
  4. Advertisement
Method 3
Method 3 of 4:

Linux

PDF download Download Article
  1. If you're logged in on your Linux desktop, you can press Ctrl + Alt + T to open a new Terminal quickly.[6]
  2. The command you'll use will be different depending on which version of Linux you're using:
    • Ubuntu & Debian:
      • Type sudo systemd-resolve --flush-caches and press Enter. In newer version of Ubuntu you may have to use command sudo resolvectl flush-caches instead.[7]
      • To make sure the command worked, run the command sudo systemd-resolve --statistics to make sure the cache is empty. In newer version of Ubuntu you may have to use command sudo resolvectl statistics instead.[8]
    • RedHat & CentOS:
      • Type systemctl restart dnsmasq.service and press Enter. You won't see any confirmation or errors, so don't worry if you don't get any feedback.
  3. Advertisement
Method 4
Method 4 of 4:

Chromebook

PDF download Download Article
  1. To flush your DNS on a Chromebook, you'll need to use the hidden Net-Internals feature in Chrome.[9]
  2. 2
    Go to chrome://net-internals in your browser. This opens a page where you can access a few handy network troubleshooting tools.
  3. Now you'll see the DNS Lookup page, where you can look up any domain or host name. You'll also see a button below this option to clear your host cache.
  4. This flushes the DNS cache in Chrome (or on your Chromebook).[10]
    • Don't be alarmed if you don't see a prompt or confirmation, as everything happens quietly in the background.
    • If you're still having trouble accessing websites, you can also try clearing your browser cache.[11]
  5. Advertisement

Community Q&A

Search
Add New Question
  • Question
    In Windows I entered the "ipconfig /flushdns" command and received the following: "The requested operation requires elevation." What does this mean?
    Community Answer
    Community Answer
    It is because you don't have administrative access. Open your cmd using administrator access (usually known as "Run As Administrator").
  • Question
    Why do some websites work and others cannot be found?
    Community Answer
    Community Answer
    Your wifi firewall or the country may have some have censorship. Change your VPN to see if that works.
  • Question
    How can I flush a D.N.S. PC laptop or mobile device?
    Community Answer
    Community Answer
    On Windows, open Command Prompt and after the prompt, without the quotes, type in "ipconfig/flushdns".
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Show More Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement

You Might Also Like

Display the Contents of Your DNS CacheDisplay the Contents of Your DNS Cache
Fix DNS Server Not Responding ProblemDNS Server Isn't Responding? Easy Troubleshooting & Fixes
This Site Cant Be ReachedQuick Ways to Fix "This Site Can't Be Reached"
Fix 502 Bad Gateway on Mac Fix 502 Bad Gateway Errors on Mac: 10 Easy Methods
Clear Your Browser's Cache Clear Your Web Browser Cache on Any Platform
Clear Windows 7 CacheClear Windows 7 Cache
No Healthy Upstream Resolve a “No Healthy Upstream” Error
Discord Not Working12 Ways to Fix Discord When It's Not Working
Clear Cache and CookiesClear Your Web Browser Cache and Cookies on Any Platform
Reset Network Settings on PC or MacReset Network Settings on PC or Mac
Block a Website on Your Computer4 Easy Ways to Block Any Website on Your Computer
Clear the Cache in Chrome2 Quick Ways to Clear Google Chrome Cache on Any Device
Err Cache Miss Solve the ERR_CACHE_MISS Error on Google Chrome
Err Connection ClosedTroubleshoot “Err Connection Closed” on Google Chrome
Advertisement

About This Article

Stan Kats
Reviewed by:
Professional Technologist
This article was reviewed by Stan Kats and by wikiHow staff writer, Nicole Levine, MFA. Stan Kats is a Professional Technologist and the COO and Chief Technologist for The STG IT Consulting Group in West Hollywood, California. Stan provides comprehensive technology solutions to businesses through managed IT services, and for individuals through his consumer service business, Stan's Tech Garage. Stan holds a BA in International Relations from The University of Southern California. He began his career working in the Fortune 500 IT world. Stan founded his companies to offer an enterprise-level of expertise for small businesses and individuals. This article has been viewed 2,149,125 times.
How helpful is this?
Co-authors: 28
Updated: June 20, 2025
Views: 2,149,125
Categories: Computer Networking
Article SummaryX

To flush your Windows computer’s DNS, start by clicking the Windows logo in the bottom left corner of your screen. Then, type “command prompt” into the search box, and select the Command Prompt app, which should be the top icon in the Start window. Next, enter "ipconfig /flushdns," and press Enter. Finish by restarting your web browser. For tips on how to flush your DNS on a Mac, read on!

Did this summary help you?

Thanks to all authors for creating a page that has been read 2,149,125 times.

Reader Success Stories

  • Jill Whiting

    Jill Whiting

    Oct 14, 2017

    "I believe it got rid of the errors. I still have to turn the computer off and start again."
Share your story

Is this article up to date?

Advertisement