Skip to content
LogoTechnipages
LogoTechnipages
  • Topics
        • Android
        • Browsers
        • Gaming
        • Hardware
        • Internet
        • iPhone
        • Linux
        • macOS
        • Office
        • Reviews
        • Software
        • Windows
        • Definitions
        • All Recent Posts
  • Product Reviews
  • About

How to Flush and Reset the DNS Cache in Windows 11

Mitch BartlettMarch 6, 2023 Comments (18)
How to Flush and Reset the DNS Cache in Windows 11

Are you facing website loading issues or worried about data privacy offline and online? You must know how to flush and reset the DNS cache in your Windows 11 or earlier PCs!

When you browse websites, the Windows 11 PC plays a major role in helping your web browser load the queried pages faster by caching the Domain Name System (DNS) addresses of the websites you visit. Problems in this DNS cache file can stop you from visiting an updated website, cloud app, or other online resources that rely on DNS addresses.

Flushing the DNS resolver cache can help resolve DNS-related problems in Microsoft Windows 11 and previous versions. Issues would include website not found errors or not being able to view certain web pages that have changed. Read on to learn the methods to flush and reset the DNS resolver cache in Windows 11.

Contents

  • 1 What Is DNS Cache?
  • 2 What Is Flush DNS and What Does It Do?
  • 3 Reasons to Flush DNS on Your Computer
  • 4 How to Flush and Reset the DNS Resolver Cache
    • 4.1 Option 1: Using Windows Command Prompt
    • 4.2 Option 2 – Windows PowerShell Terminal
    • 4.3 Option 3 – Using Run Command Dialog Box
    • 4.4 Option 4 – Using a Batch File for Flush DNS
  • 5 How to Flush and Reset the DNS Resolver Cache in Web Browsers
  • 6 FAQ
    • 6.1 What is the DNS Resolver Cache?
    • 6.2 Why would flushing the DNS Resolver Cache fix anything?
    • 6.3 Can I view the data in the DNS Resolver Cache?
  • 7 Conclusion

What Is DNS Cache?

While you recognize a website by its URL like technipages.com, the web browser or computer recognizes the same website using its IP address, which is 172.67.69.195. Now, all these IP addresses for billions of websites are available in various DNS servers around the world. Your Internet Service Provider (ISP) also maintains a secondary DNS server cache as a backup to the primary DNS servers.

An example of the Windows 11 DNS resolver cache
An example of the Windows 11 DNS resolver cache

When you type an URL in the address bar of Chrome or Mozilla web browser for the first time, it requests the IP address from a nearby DNS server to open the web page. The Windows 11 PC copies the resolved IP from the first query and saves it in a DNS resolver cache.

The next time you open the same web page, the web browser no longer requests a DNS server to translate the URL to an IP address. It takes help from the DNS resolver cache in your operating system. This is known as a DNS cache of a local computer like Windows 11. Similar to Windows PCs, macOS, Linux, etc., computers also maintain a local cache copy of all the websites that you visit.

Also read: What Is a DNS Record?

What Is Flush DNS and What Does It Do?

Flush DNS is a common Command Prompt code for all modern Windows operating systems since Windows 2000. You can use this code to force the Windows PC to clear the records in its DNS resolver cache. Operating system developers allow the users to do this manually to avoid data security issues, website loading problems, and other DNS address-related issues.

After you use the Flush DNS command, Windows wipes the entire DNS cache that it built since the recent clean installation of Windows 11 or any other Windows operating system. The web browsers from now on need to send a DNS resolver query to the nearest DNS server to get the latest IP of the URL you’re trying to access. Soon, Windows 11 will record these resolved IPs in the local DNS resolver cache.

Also read: How to Reinstall Windows 11 for Free: 3 Easy Methods for Everyone

Reasons to Flush DNS on Your Computer

A graphical representation of the 404 error
A graphical representation of the 404 error

If you’re unable to clear or reset the data in the local DNS cache then you’ll be in serious trouble when trying to access websites or use apps that fetch data from the internet using the operating system. Thus, most operating systems let you flush the DNS resolver cache so that it can update itself. Here are the reasons why you might want to use the Flush DNS command on your Windows 11 PC:

  • When you try to access a website you know exists but repeatedly get the 404 error, you can reset the local DNS cache.
  • You’re trying to access a website and the browser is taking you to the dated version of it. In this situation, you must flush and reset the DNS cache.
  • The local copy of the DNS resolver cache is also a privacy concern. If you browse websites, online apps, internet banking portals, and run business apps from a public or third-party Windows PC, you may want to flush the DNS before leaving. It helps you to wipe clean your online activities on a public PC.
  • If you think you have become a victim of DNS spoofing or DNS cache poisoning, you must flush the DNS resolver cache of your computer.
  • You use business apps like enterprise resource planning (ERP), customer relationship management (CRM), online SQL database, etc., and these apps are unable to fetch the latest data from the cloud or on-site server.

How to Flush and Reset the DNS Resolver Cache

Find below the simple and quick methods to flush the DNS resolver cache and push Windows 11 to build a new DNS cache for future online activities. You can perform most of these methods on earlier Windows PCs that run on Windows 10, 8, 7, XP, 2008, and 2003.

Option 1: Using Windows Command Prompt

To reset the DNS resolver cache, perform the following steps on a Windows 11 PC:

  • Select the Start button, then type CMD on your keyboard.
  • Right-click Command Prompt and choose Run as Administrator.
  • Alternatively, you can click the Run as administrator hyperlink on the right-side panel of the Start Menu that show the Command Prompt app.
  • Copy and paste the following command into the Command Prompt and hit Enter:
ipconfig /flushdns
  • You must include the space before the forward slash.

How to Flush and Reset the DNS Resolver Cache using Command Prompt
How to Flush and Reset the DNS Resolver Cache using Command Prompt

  • The command line interface will show the message: Successfully flushed the DNS Resolver Cache.

This method is also valid for Windows 10, 8, 7, Vista, XP, etc.

Option 2 – Windows PowerShell Terminal

  • Select the Start button, then type PowerShell.
  • Select the Windows PowerShell app from the list of apps.

How to flush DNS cache using PowerShell
How to flush DNS cache using PowerShell

  • Type the following command, then press Enter:
Clear-DnsClientCache
  • It’ll erase the DNS resolver cache but won’t show any confirmation message.
  • Alternatively, you can use the following command on PowerShell to see a confirmation message:
ipconfig /flushdns

Also read: Flush and reset a client resolver cache using the ipconfig command – from Microsoft

Option 3 – Using Run Command Dialog Box

  • Hit the Windows + R keys simultaneously on your keyboard.
  • The Run command dialog box will show up in the bottom left corner of the screen.
  • There, you should see the Open field.

Reset DNS resolver cache using the Run command
Reset the DNS resolver cache using the Run command

  • Type the following command in that field and hit Enter to erase the local DNS cache on your Windows 11 PC:
ipconfig /flushdns
  • You’ll see a silhouette of the Command Prompt and this confirms that Windows 11 cleared the DNS resolver cache.

Option 4 – Using a Batch File for Flush DNS

If you need to run the flush DNS command repeatedly for website and mobile app development purposes on your Windows 11 PC, you may want to create a batch file for the codes. Then, double-clicking the batch file will automatically clear the local DNS cache. Here are the batch file creation steps you can follow:

  • Open the Notepad application.
  • Copy and paste the following batch file command in it:
cmd.exe /k ipconfig /flushdns
  • Now, save the Notepad as a batch file. To do this, simply hit Ctrl + S and then rename the file as flushDNS.bat.

How to flush DNS using a batch file
How to flush DNS using a batch file

  • In the Save as type drop-down list, select All files.
  • Click Save to create the batch file.
  • Now, go to the folder where you saved the batch file and double-click it.
  • The Command Prompt will show up with the confirmation message that Windows deleted the local DNS cache copy.

How to Flush and Reset the DNS Resolver Cache in Web Browsers

You might also want to clear the DNS cache copy of the web browser in case you’re facing website loading issues or suspect hackers targeted your computer for DNS cache poisoning. Here’s how you can accomplish this for Chrome, Mozilla, and Edge web browsers:

  • Open the Google Chrome browser and type in the following destination in its address bar:

Flush DNS cache on Chrome
Flush DNS cache on Chrome

chrome://net-internals/#dns
  • Now hit Enter to access the DNS cache copy of the Chrome browser.
  • Beside the Host resolver cache text, click the Clear host cache button.
  • For the Firefox web browser, simply use the following destination, and the rest of the steps are the same as Chrome:

How to clear DNS resolver cache on Firefox
How to clear DNS resolver cache on Firefox

about:networking#dns
  • If you’re on Microsoft Edge, then you can use the following code:

How to clear DNS resolver cache on Edge
How to clear DNS resolver cache on Edge

edge://net-internals/#dns

FAQ

What is the DNS Resolver Cache?

Whenever you visit a website using its domain name (i.e. microsoft.com), your browser is directed to a DNS server where it learns the IP address of that website. You are then directed to that website. A record of the IP address that the domain name points to is created within Windows so that if you visit that same website again, the information is accessed quicker. These records that get created make up the DNS Resolver Cache.

Why would flushing the DNS Resolver Cache fix anything?

Sometimes an IP address to a site may change. If the DNS Resolver Cache has the old IP address record, it may result in your computer not being able to reach the site. Cached data can also become corrupt. Therefore, clearing it is a step you can take whenever you cannot connect to a site.

Can I view the data in the DNS Resolver Cache?

Yes, you can. From a Command Prompt, you can use the following command to view the data in the DNS resolver cache:

ipconfig /displaydns

How to get DNS client cache
How to get the DNS client cache

Alternatively, you can use the Microsoft PowerShell terminal on Windows 11 or 10 computer and execute the following code in it to view the data stored in your Windows PC’s DNS resolver cache:

Get-DnsClientCache

Conclusion

So, now you know how to flush and reset the DNS resolver cache in a Windows 11 PC. You also learned how to delete the local cache copy of DNS using Command Prompt and Run command dialog box in earlier versions of Windows like Windows 8, 7, Vista, XP, etc. Give the above methods a try when you face internet connectivity issues with a specific website or app. Don’t forget to comment below if I missed any other steps to flush and reset the DNS resolver cache in Windows PCs.

Next up, Why Is It Important to Route DNS Traffic Over Your VPN?

Categories: Windows

Author Mitch Bartlett

Through my career that spans over 20 years I have become an expert in Microsoft Systems Administration, Android, and macOS. I started this site as a technical guide for myself and it has grown into what I hope is a useful knowledgebase for everyone.

You Might Also Like

  • How to Create RDP Shortcut Icon in Windows 10

    Mitch BartlettWindows
  • bluetooth-toggle-missing-windows-10

    Fix Bluetooth Toggle Missing on Windows 10 or 11

    Madalina DinitaWindows
  • surface-pen-not-working-after-update

    Fix Surface Pen Not Working After Update

    Madalina DinitaWindows
  • fix-Windows-10-Webcam-Blurry-Out-of-Focus

    Fix: Windows 10 Webcam Is Out of Focus

    Madalina DinitaWindows

Comments

  1. DBAAbhi says:
    June 11, 2022 at 11:25 pm

    Thank you for the information.

  2. kiran says:
    February 14, 2022 at 1:51 pm

    Very good information I got from here.

  3. sergei says:
    July 30, 2021 at 9:20 am

    not working

  4. Vanessa says:
    March 26, 2021 at 12:15 pm

    This forum/blog is extremely helpful. Thank you all for your posts.
    Windows IP Configuration – Run successfully flushed the DNS Resolver Cache but continually ask for
    C: \Users\Owner > and accepts nothing I input.

    Please Advise!

  5. The Plumber says:
    March 5, 2021 at 12:08 pm

    Typing “cmd” didn’t work I had to type “run”

  6. Scheherazade says:
    February 10, 2021 at 8:35 pm

    This would be very useful IF Windows 10 showed a command line when I click Start, so I could type anything at all. I can’t find a way to get to the cmd prompt.

  7. Abdullah Al Mehedy says:
    February 14, 2020 at 10:14 pm

    Really It’s a Very Helpful Article. Thanks for share with us.

  8. Angela Grzywacz says:
    December 16, 2019 at 4:58 am

    Hi I have just purchased a new lap top and it has problems connecting to the internet. the trouble shoot guide says : The DNS server is not responding” . please can you help

  9. DebianFanatic says:
    November 1, 2019 at 3:35 pm

    If you don’t want the command window to disappear, don’t use the Run command; use the Command Prompt command instead (as Administrator).

    This will open a command terminal, wherein you can type

    ipconfig /flushdns

    and then to exit the command terminal window, either X at the top-right or enter the command

    exit

  10. F says:
    August 23, 2019 at 5:23 am

    To read the data, try copy and pasting everything into a doc. You can do this as the data is loading.

    My question is about all the data that is in there after the flush. It appears to be junk but I’d like it gone so the next display dns is clean.

  11. Marge says:
    August 9, 2019 at 2:37 pm

    I don’t know yet. Have to relaunch website fix was for.

  12. Chris says:
    June 9, 2019 at 2:11 pm

    I tried this. Two web sites still refuse to load on any browser.

  13. Sanjay G M says:
    June 6, 2019 at 4:40 am

    it is worked with the RUN command but it is run dialogue box quickly and even guys not seen the operation, if want see the operation try with the command prompt with the following command

    ipconfig /flushdns (be sure there is a space before the slash)

  14. Ronald Kriel says:
    March 5, 2019 at 7:10 pm

    When using the run command “ipconfig /displaydns” the command prompt window scrolls by so fast I cannot read it. I did try “ipconfig /displaydns /p just in case it worked like directory searches. No luck.

  15. OldGoat says:
    February 19, 2019 at 10:32 am

    Richard & Anika the ipconfig/flushdns window will appear and disappear quickly.. sometimes a momentary pause it the cache is rather full but otherwise sometimes you may not even witness it but it will function as per the command

  16. anika says:
    February 10, 2019 at 12:55 pm

    For me happens the same, box quickly disappears ;/

  17. Michael A. Bethea says:
    January 24, 2019 at 11:00 am

    Very helpful. As a Customer Service analyst for the CDC, I come across this problem from time to time. It’s good to have yet another trick in my arsenal. Thanks!

    Michael Bethea
    Atlanta, GA

  18. Richard Hutchinson says:
    January 24, 2019 at 10:51 am

    When I do these steps my run diallogue box quickly disappears ,,,,,thats all.

Leave a Reply

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

  • error 400 when signing in

    Encountered Error 400 When Signing In to Microsoft? Here’s What You Can Do 

  • unable to create notebook error in onenote

    We Were Unable to Create Your Notebook Error in OneNote – Common Fixes 

  • error code 0x800704f8 fix

    Error Code 0x800704f8 – How to Fix 

  • back button in browsers doesnt work

    What to Do if the Back Button in Browser Doesn’t Work 

  • could not find this item

    “Could Not Find This Item” When Trying to Remove Files

profile pic

The Experts Behind Technipages

My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

Learn More

technipages logo white
linkedin icon

Technipages is part of Guiding Tech Media, a leading digital media publisher focused on helping people figure out technology. Learn more about our mission and team here.

© 2026 Guiding Tech Media All Rights Reserved

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

© 2026 Guiding Tech Media All Rights Reserved

Information from your device can be used to personalize your ad experience.
Do not sell my personal information.

Last Updated on March 6, 2023 by Mitch Bartlett