How to Flush DNS Cache on Windows 11

Quick answer: To flush the DNS cache on Windows 11, open PowerShell or Command Prompt as administrator and run ipconfig /flushdns. You should see "Successfully flushed the DNS Resolver Cache." In PowerShell, Clear-DnsClientCache does the same thing.

Sometimes a website won’t load on your PC, even though it works on your phone. Or a site you manage moved to a new server, but your computer keeps showing the old version. In many of these cases, the cause is an outdated entry in your PC’s DNS cache, and flushing it is a quick, safe fix.

This guide explains what the DNS cache is, when flushing it can help, and how to do it on Windows 11 using Terminal, PowerShell, and your web browser. You’ll also learn how to check that it worked.

What Is the DNS Cache?

When you visit a website, your PC asks a DNS server to translate the site’s name (like fixitstep.com) into an IP address. To save time, Windows stores the answers in a local list called the DNS resolver cache. The next time you visit the same site, Windows can use the saved answer instead of asking again.

Most of the time, this makes browsing faster. But if a saved entry becomes outdated or incorrect, your PC may keep trying to reach the wrong address. Flushing the DNS cache deletes all saved entries, so Windows asks the DNS server for fresh answers.

When Should You Flush the DNS Cache?

Flushing the DNS cache may help when:

  • A specific website won’t load on your PC but works on other devices.
  • You see errors such as "DNS_PROBE_FINISHED_NXDOMAIN" or "This site can’t be reached" in your browser.
  • A website recently moved to a new server or changed its domain settings.
  • You changed your DNS server and want the change to take effect right away.
  • You edited the hosts file and want Windows to use the new entries.

Flushing the DNS cache is safe. It doesn’t delete files, saved passwords, or browser history, and it doesn’t disconnect you from the network.

Method 1: Flush DNS Cache Using ipconfig

This is the most common method and works on every version of Windows 11.

  1. Select Start, type PowerShell, and under Windows PowerShell, select Run as Administrator.
Start search results for PowerShell with Run as Administrator highlighted
  1. If User Account Control asks for permission, select Yes.
  2. Type the following command and press Enter:
ipconfig /flushdns
  1. You should see the message: Successfully flushed the DNS Resolver Cache.
PowerShell window showing "Successfully flushed the DNS Resolver Cache."

That’s it. The next time you visit a website, Windows will look up its address again.

Tip: You can also right-click the Start button and select Terminal (Admin). The ipconfig /flushdns command works the same way in PowerShell, Terminal, and Command Prompt.

Method 2: Flush DNS Cache Using a PowerShell Command

PowerShell has its own built-in command for clearing the DNS cache. It does the same thing as ipconfig /flushdns.

  1. Open Windows PowerShell as administrator (see Method 1, step 1).
  2. Type the following command and press Enter:
Clear-DnsClientCache
Administrator PowerShell window after running Clear-DnsClientCache

This command doesn’t display a confirmation message. If no error appears, the cache was cleared.

How to View the DNS Cache (Optional)

If you’re curious about what’s stored in the cache, or want to confirm that it was cleared, you can view its contents.

Using ipconfig:

ipconfig /displaydns

This lists every cached entry, including the Record Name and the address it points to. The list can be long, so scroll up to see all of it.

Terminal showing ipconfig /displaydns output with Record Name entries

Using PowerShell:

Get-DnsClientCache

This shows the same information in a table format.

Run either command before and after flushing. Right after a flush, the list should be much shorter. It will start filling up again as your PC visits websites, which is normal.

Note: Entries from the Windows hosts file (C:\Windows\System32\drivers\etc\hosts) are loaded into the cache automatically, so they stay in the list even after a flush. If you see website names you don’t recognize, check that file. Some programs add entries to it.

Method 3: Clear the DNS Cache in Chrome or Edge

Google Chrome and Microsoft Edge keep their own internal DNS cache, separate from the one in Windows. If a website still won’t load after flushing the Windows cache, clear the browser’s cache too.

Microsoft Edge:

  1. Open Edge and type edge://net-internals/#dns in the address bar, then press Enter.
  2. Select Clear host cache.
  3. (Optional) Type edge://net-internals/#sockets in the address bar, press Enter, and select Flush socket pools. This closes open connections so the browser uses the fresh DNS results immediately.

Google Chrome:

  1. Open Chrome and type chrome://net-internals/#dns in the address bar, then press Enter.
  2. Select Clear host cache.
Chrome net-internals DNS page with the Clear host cache button
  1. (Optional) Go to chrome://net-internals/#sockets and select Flush socket pools.

After clearing, close and reopen the browser, then try the website again.

Optional: Renew Your Network Connection Too

If flushing DNS didn’t solve the problem, refreshing your PC’s network connection may help. In an administrator PowerShell window, run these commands one at a time:

ipconfig /release
ipconfig /renew
ipconfig /flushdns

The first command briefly disconnects your PC from the network, and the second reconnects it with a fresh IP address from your router. On a wired connection, this usually takes only a few seconds.

Common DNS Error Messages and What They Mean

Browsers show different messages when a DNS lookup fails. Knowing what they mean can help you decide whether flushing the cache is likely to help:

  • DNS_PROBE_FINISHED_NXDOMAIN: The DNS server says the domain doesn’t exist. This can be caused by a typo in the address, an outdated cache entry, or a domain that has expired. Check the spelling first, then flush the cache.
  • DNS_PROBE_FINISHED_NO_INTERNET: Your PC isn’t connected to the internet at all. Flushing DNS won’t fix this; check your cable and router first.
  • ERR_NAME_NOT_RESOLVED: The browser couldn’t find an address for the site. Flushing the Windows and browser caches is a good first step.
  • "Server IP address could not be found": Similar to the above. It often happens after a site moves to a new server, which is exactly the situation where a flush helps.

The exact wording of these messages depends on your browser and its version.

If Flushing the DNS Cache Didn’t Help

If the website still won’t load:

  • Try a different browser to see whether the problem is specific to one browser.
  • Restart your router. Many routers keep their own DNS cache. Unplug the router for about 30 seconds and plug it back in.
  • Change your DNS server. If your provider’s DNS server isn’t responding correctly, switching to a public DNS service may help.
  • Check whether the site is down for everyone. The problem may be on the website’s side.
  • Reset your network settings if several websites or apps can’t connect.

Frequently Asked Questions

Is it safe to flush the DNS cache?

Yes. Flushing the DNS cache only removes saved website-to-address lookups. It doesn’t delete files, passwords, or browsing history, and Windows rebuilds the cache automatically as you browse.

How often should I flush my DNS cache?

There’s no need to do it on a schedule. Windows manages the cache automatically. Flush it only when you have a problem reaching a website or after changing DNS settings.

Does restarting my PC clear the DNS cache?

Yes, a full restart clears the Windows DNS resolver cache. Flushing it with a command is just faster, because you don’t need to close your apps or restart.

Related Guides


About FixItStep

This guide was written by the FixItStep Team, a small group of tech enthusiasts who create clear, step-by-step tutorials for Windows 11 and everyday software. The screenshots in our guides are taken on a real Windows 11 PC, and we review our articles as Windows changes. Found a step that looks different on your PC? Let us know, or learn more about us.