How to flush DNS on Windows 11 and 10 (and when you should)
A website moved to a new server, but your PC keeps loading the old one. A page works on your phone and fails on your laptop. You changed your DNS settings and nothing seems different. In all three cases, the likely culprit is the DNS cache on your computer, and the fix takes about ten seconds.
This guide shows how to flush DNS on Windows 11 and Windows 10, how to clear the separate cache inside your browser, and how to tell when a flush will help and when the problem is somewhere else.
What does it mean to flush DNS?
Every time you visit a website, your computer has to turn its name (like eonvpn.com) into an IP address. It asks a DNS server, gets the answer and saves it in a local list called the DNS resolver cache. The next time you visit, Windows reads the saved answer instead of asking again, which makes pages start loading a little sooner.
Flushing DNS empties that list. Windows then forgets every saved address and looks each site up fresh the next time you open it. Microsoft’s ipconfig documentation describes /flushdns as the command that “flushes and resets the contents of the DNS client resolver cache”, including failed lookups that Windows saved as “not found”.
Two things it does not touch: entries in your Hosts file stay in place, and your browser keeps its own small cache, which we cover below. To see what your IP address itself reveals, read our guide on what can someone do with your IP address.
When should you flush your DNS cache?
You don’t need to flush DNS on a schedule. It is a troubleshooting step, and it helps in a handful of situations:
- A site loads an old version or the wrong server. The site changed its IP address, but your PC still has the old one saved.
- A site works on other devices but not on your PC. A bad or outdated cache entry is a common cause.
- You see “DNS_PROBE_FINISHED_NXDOMAIN” or “server IP address could not be found”. Windows may have saved a failed lookup and keeps reusing it.
- You just changed your DNS server. Flushing makes Windows use the new server straight away. If you are picking one, see our list of the best DNS servers for gaming.
- You connected or disconnected a VPN. Old answers from your previous network can linger after the switch.
- You want to clear the record of sites you visited. The cache holds a list of recently resolved domains, which anyone using your PC could view.
How to flush DNS on Windows 11 and 10
The steps are the same on Windows 11 and Windows 10. You can use Command Prompt or PowerShell; both do the same job.
Flush DNS with Command Prompt
- Press the Windows key, type cmd, and select Command Prompt. A normal window is enough for this command.
- Type the following and press Enter:
1 | ipconfig /flushdns |
- You should see: “Successfully flushed the DNS Resolver Cache.”
That’s it. Open your browser and try the site again.
If you see “Could not flush the DNS Resolver Cache: Function failed during execution”, the DNS Client service may be stopped. Restart your PC and try again, or open Command Prompt as administrator (right-click it and choose Run as administrator).
Flush DNS with PowerShell
- Right-click the Start button and choose Terminal (Windows 11) or Windows PowerShell (Windows 10).
- Run:
1 | Clear-DnsClientCache |
PowerShell does not print a confirmation message. If no error appears, the cache is clear. Microsoft documents this command on its Clear-DnsClientCache page.
Check that the DNS cache is clear
To see what Windows has saved, run this in Command Prompt:
1 | ipconfig /displaydns |
Right after a flush, the list is very short (often just entries from your Hosts file). It fills up again as soon as you start browsing, which is normal. In PowerShell, Get-DnsClientCache shows the same list as a table.
Release and renew your IP address
If flushing DNS alone does not fix a connection problem, the next step is to get a fresh IP address from your router. Open Command Prompt as administrator and run these commands one at a time:
1 | ipconfig /release |
Your connection drops for a few seconds during /release. That’s expected. If you are troubleshooting a “No valid IP configuration” error, our guide to fixing the Wi-Fi doesn’t have a valid IP configuration error walks through the full network reset, including netsh winsock reset.
Clear the DNS cache in your browser
Chrome and Edge keep their own short-lived DNS cache on top of the Windows one. If a site still fails after ipconfig /flushdns, clear the browser cache too:
- Google Chrome: go to
chrome://net-internals/#dnsand click Clear host cache. Then openchrome://net-internals/#socketsand click Flush socket pools. - Microsoft Edge: go to
edge://net-internals/#dnsand click Clear host cache. - Firefox: go to
about:networking#dnsand click Clear DNS Cache.
Closing and reopening the browser also clears these caches.
How to flush DNS on other devices
Other devices keep a DNS cache too. The steps are short:
- Mac: open Terminal and run
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. - Linux (most current distributions): run
resolvectl flush-caches. - iPhone and Android: switch Airplane mode on for a few seconds and then off, or restart the phone.
- Router: restarting the router clears its cache as well.
Sometimes the stale answer comes from the DNS server you use, not from your device. Google Public DNS, for example, offers a Flush Cache tool that asks its servers to look up a domain again.
Flush DNS after you connect a VPN
When you connect a VPN, your DNS lookups should go through the VPN instead of your Wi-Fi network or internet provider. But the answers your PC saved before you connected are still in the cache. Flushing right after you connect makes sure new lookups go through the VPN tunnel from the start, and it removes the list of sites you looked up on the previous network.
With the free EonVPN app for Windows, the order is simple:
- Open EonVPN and connect to a server.
- Open Command Prompt and run
ipconfig /flushdns. - Reload the site you want to open.
To confirm that your lookups really go through the VPN, run a DNS leak test. Our guide on how to prevent DNS leaks with a VPN shows how to check and what to change if the test shows your provider’s servers.
When a DNS flush does not fix it
A DNS flush only fixes problems caused by saved lookups. If the site still won’t load, check these next:
- The DNS server is not answering. If you see “DNS server isn’t responding”, the issue is the server, not your cache. Our guide on how to fix “DNS server not responding” covers switching servers and resetting the adapter.
- The site itself is down. Try it on mobile data. If it fails there too, the problem is on the site’s side.
- There is no connection at all. Run
ping 8.8.8.8in Command Prompt. If that fails, the problem is your network, not DNS. Our guide on how to ping an IP address explains how to read the results. - Wi-Fi shows “No internet, secured”. That is a connection problem with the router; see our fix for No internet, secured.
- The network blocks the site. School and office networks often block sites at the DNS level. Flushing won’t change that, because the network’s DNS server gives the same blocked answer every time.
FAQs
Is it safe to flush DNS?
Yes. Flushing DNS only deletes saved lookups, and Windows rebuilds the list automatically as you browse. It does not delete files, passwords or browser history. The only side effect is that the first visit to each site takes a fraction of a second longer.
Do I need to restart my PC after flushing DNS?
No. The change takes effect immediately. Just reload the page. If a site still fails, close and reopen the browser so its own cache clears too.
Do I need admin rights to run ipconfig /flushdns?
Usually not for ipconfig /flushdns. A normal Command Prompt window can flush the cache on most Windows 11 and 10 PCs. If Windows says the operation requires elevation, open Command Prompt as administrator and run it again. netsh winsock reset always needs an administrator window.
How often should I flush DNS?
Only when something is wrong: a site loads the old version, fails on your PC but works elsewhere, or you just changed your DNS server or connected a VPN. Flushing every day brings no benefit.
Does flushing DNS change my IP address?
No. Your IP address comes from your router and internet provider, not from the DNS cache. To get a new local IP, use ipconfig /release and ipconfig /renew. To change the IP address websites see, use a VPN. Our guide on how to change your IP address on Windows covers both.
What is the difference between ipconfig /flushdns and Clear-DnsClientCache?
They do the same thing. ipconfig /flushdns is the classic Command Prompt command and prints a confirmation. Clear-DnsClientCache is the PowerShell version and runs silently.

