How to Clear DNS Cache in Windows 11

To clear the DNS cache in Windows 11, open Command Prompt, type ipconfig /flushdns, and press Enter. When you see “Successfully flushed the DNS Resolver Cache,” Windows has thrown out its saved website lookups and will fetch fresh ones the next time you visit a site.

These steps work on Windows 11 (including 24H2 and 25H2) and Windows 10, with a short Windows 10 note near the end. You’ll also see the PowerShell command, how to check the cache, how to clear your browser’s own DNS cache, and what to try when a flush doesn’t fix the problem.

What the DNS cache is and when to clear it

Every time you visit a website, Windows asks a DNS server to turn the name (like example.com) into an IP address. The DNS Client service keeps recent answers in a local cache so it doesn’t have to ask again. The cache also holds entries loaded from your Hosts file.

Most of the time that cache helps. It causes trouble when an entry goes stale or a failed lookup gets saved. Clear it when:

  • A website moved to a new server and your PC still goes to the old one.
  • A site loads on your phone but not on your PC, or your browser says it can’t find the server’s address.
  • You changed your DNS server or edited the Hosts file and the change doesn’t seem to take effect.
  • You’re working through a “can’t reach this page” problem and want to rule out a bad saved answer.

Clearing the DNS cache doesn’t delete your browsing history, cookies, saved passwords or files. It also won’t make a slow connection faster in general. It only fixes problems caused by wrong or outdated lookups.

Advertisements
Three-step flow: open Command Prompt as administrator, run ipconfig /flushdns, and read the success message
Illustration: Running ipconfig /flushdns empties the Windows DNS cache and shows a success message.

Clear the DNS cache with Command Prompt

  1. Select Start and type cmd. Command Prompt appears at the top of the results.
  2. Select Run as administrator on the right side of the search results, then select Yes in the User Account Control box. A black Command Prompt window opens.
  3. Type ipconfig /flushdns and press Enter.
  4. Read the reply. “Successfully flushed the DNS Resolver Cache” means the cache is empty.
  5. Close any browser tabs for the site that wasn’t working, reopen the browser, and load the page again.

Microsoft’s ipconfig command reference describes /flushdns as flushing and resetting the DNS client resolver cache, including failed (negative) entries.

Clear the DNS cache with PowerShell

If you prefer PowerShell or Windows Terminal, there’s a built-in command that does the same job. Microsoft states that running it is equivalent to ipconfig /flushdns.

Comparison of ipconfig /flushdns in Command Prompt and Clear-DnsClientCache in PowerShell
Illustration: Clear-DnsClientCache in PowerShell does the same job as ipconfig /flushdns in Command Prompt.
  1. Right-click Start and select Terminal (Admin), then select Yes.
  2. Type Clear-DnsClientCache and press Enter.
  3. The prompt comes back with no message. That’s normal, and it means the command ran.

Here’s more on how to run PowerShell as admin in Windows 11 if the Terminal option isn’t in your menu. The cmdlet is documented on Microsoft’s Clear-DnsClientCache page.

Check what’s in the DNS cache

To see the cache before or after you clear it, run one of these:

  • ipconfig /displaydns in Command Prompt lists every cached name and the address it points to.
  • Get-DnsClientCache in PowerShell shows the same entries in a table.

Right after a flush, the list should be empty or show only entries from your Hosts file. New entries show up again as soon as you open websites, and that’s normal. Hosts file entries are also how you can block a website in every browser on Windows 11, and flushing the cache makes a new entry take effect. Those hosts entries come from a text file you can change yourself, as explained in how to edit the Windows 11 hosts file.

Clear your browser’s DNS cache too

Chrome and Edge keep their own small DNS cache, separate from Windows. If a site still fails in one browser after a Windows flush, clear the browser’s copy:

  1. In Chrome, type chrome://net-internals/#dns in the address bar and press Enter. In Edge, type edge://net-internals/#dns.
  2. Select Clear host cache.
  3. Close every browser window and open the browser again.

Clearing the host cache isn’t the same as clearing cached images and files. If pages still look outdated after this, clear the browser’s cached images and files from its privacy settings. In Chrome, that means deleting cached images and files from the Chrome cache on Windows 11 while leaving cookies and passwords alone. In Microsoft Edge, cached images and files have their own box in Clear browsing data, and clearing Edge’s cache and cookies works the same way on Windows 10 and Windows 11.

If clearing the DNS cache doesn’t fix it

A flush only removes saved answers. If the DNS server itself is giving bad answers, or something else is blocking the connection, work through these in order:

  • Test another device. If your phone on the same Wi-Fi can’t load the site either, the problem is the router, your provider or the site, not your PC. Restart the modem and router.
  • Get a new IP address. In an admin Command Prompt, run ipconfig /release, then ipconfig /renew. Your connection drops for a moment in between.
  • Switch DNS servers. If lookups keep failing, your provider’s DNS may be the issue. Here’s how to change DNS in Windows 11.
  • Check the firewall. If one site is blocked while others work, learn how to allow a website through Windows Firewall in Windows 11.
  • Reset Winsock and TCP/IP. In an admin Command Prompt, run netsh winsock reset, then netsh int ip reset, then ipconfig /flushdns. Restart the PC afterward.

When a full network reset makes sense

Use network reset only after the steps above fail and every site or every connection is broken. It removes all installed network adapters and their settings. You’ll need to rejoin Wi-Fi networks, and VPN or other network software may need to be set up again.

Settings path from Network and internet through Advanced network settings to Network reset and Reset now
Illustration: Network reset sits under Advanced network settings and reinstalls your network adapters after a restart.
  1. Select Start and open Settings.
  2. Select Network & internet > Advanced network settings > Network reset.
  3. Select Reset now, then Yes to confirm.
  4. Wait for the PC to restart. Windows reinstalls your network adapters with default settings.

Microsoft’s guide to fixing Wi-Fi connection issues in Windows lists the same commands and the network reset path.

On Windows 10

The commands are the same on Windows 10: ipconfig /flushdns in Command Prompt or Clear-DnsClientCache in PowerShell. To open an admin window, search for cmd and choose Run as administrator, or right-click Start and pick Windows PowerShell (Admin). Windows 10 also has a network reset option in Settings under Network & Internet, with the same effect as on Windows 11.

Questions

Does clearing the DNS cache delete my browsing history or passwords?

No. It only removes saved name-to-address lookups. Your history, bookmarks, cookies and saved passwords stay where they are.

How often should I flush DNS?

Only when something is wrong, such as a site that won’t load or still shows an old version. Windows refreshes cached entries on its own as they expire, so a routine flush doesn’t add anything.

Is flushing DNS the same as resetting DNS?

People use both terms for ipconfig /flushdns. A bigger reset, where Windows rebuilds its network settings, is the Winsock and TCP/IP reset or the network reset described above.

Why do I still get “DNS server not responding” after a flush?

That error usually points to the DNS server or your connection, not the cache. Restart the router, try another DNS server, or follow the steps for fixing temporary DNS resolution failures on Windows 11.

Next, open the site that gave you trouble and check whether it loads now that Windows is using fresh lookups.

Advertisements