Need to flush the DNS cache on Windows? One command does it: open Command Prompt or PowerShell and run ipconfig /flushdns. Windows throws away every hostname it has cached and looks each one up fresh on the next request, which fixes the very common case where a site moved servers but your PC still points at the old address. It works the same on Windows 10 and 11, takes about a second, and needs no reboot. Here's the exact command, how to prove the cache is actually empty afterward, a way to restart the resolver service when a plain flush isn't enough, and the cases where the stale answer is hiding somewhere else entirely.
The short answer
Open Command Prompt or PowerShell and run
ipconfig /flushdns. Windows clears every cached DNS lookup, and the next
request rebuilds it from your DNS server. No reboot, and the basic flush
needs no admin rights.
Step 1: open Command Prompt (or PowerShell)
Press the Windows key, type cmd, and press Enter. A normal prompt is enough
for the flush itself. You only need Run as administrator later, if you end
up restarting the DNS service in the last step.
Step 2: flush the cache
ipconfig /flushdns You’ll see the line “Successfully flushed the DNS Resolver Cache.” That is
the whole job done. The exact same command works in PowerShell, or you can use
the native PowerShell cmdlet Clear-DnsClientCache, which does the same thing.
Step 3: confirm it worked (optional)
If you want proof rather than trust, ask Windows what is in the cache:
ipconfig /displaydns Right after a flush this prints almost nothing, then fills back up as you open sites again. Here is the before-and-after in one terminal:
When a plain flush isn’t enough
Occasionally the cache seems stuck. Restart the DNS Client service from a Command Prompt opened as administrator:
net stop dnscache && net start dnscache If that returns “Access is denied”, the prompt is not elevated. Reopen it with Run as administrator and try again.
When the stale answer is somewhere else
If a site still points at the wrong server after all this, the cache you need is not on your PC. Three usual suspects: the browser keeps its own DNS cache (Chrome clears it at chrome://net-internals/#dns), the home router caches lookups and a reboot clears it, and public resolvers hold the record until its TTL runs out, which no local command can shortcut.
On Linux instead? The resolvers are completely different there: see how to flush the DNS cache on Linux.
Frequently asked questions
Do I need administrator rights to flush the DNS cache?
For the basic ipconfig /flushdns, no. A normal Command Prompt is enough. You only need an elevated prompt if you go further and restart the DNS Client service with "net stop dnscache", which is rarely necessary.
How do I know the flush actually worked?
The command prints "Successfully flushed the DNS Resolver Cache" on success. To double-check, run "ipconfig /displaydns" right after: a freshly flushed cache is nearly empty and then refills as you browse.
I flushed the cache but the site still resolves to the old IP. Why?
The stale answer is probably cached somewhere else. The browser keeps its own DNS cache (in Chrome, clear it at chrome://net-internals/#dns), the home router caches too, and public resolvers hold the record until its TTL expires. See our DNS TTL guide for why that wait cannot be skipped.
What is the PowerShell equivalent of ipconfig /flushdns?
Clear-DnsClientCache does the same job and is handy in scripts. Both clear the same Windows resolver cache, so use whichever shell you already have open.