Knowledge Base →4 min readUpdated: 2026-09-21

How to Flush the DNS Resolver Cache in Windows 11

Flushing the DNS resolver cache takes one command and about a second: open Command Prompt, type ipconfig /flushdns, press Enter, and Windows drops every domain-to-IP mapping it has memorized. It is completely safe — the cache refills itself within the first minutes of normal browsing. Reach for it when a site opens on your phone but not on your PC, right after editing the hosts file, or when a VPN leaves some domains unreachable.

What the DNS cache is and why it goes stale

Windows keeps a local copy of recent DNS answers: the DNS Client service (Dnscache) stores every domain-to-IP translation so that repeat visits skip the resolver and load faster. Each entry carries a TTL, a time-to-live set by the domain's owner, and expired entries are normally replaced on their own. Alongside successful answers, Windows also caches failures for a short while, so a single dropped lookup can echo for the next several seconds or minutes.

The cache only becomes a problem when reality changes faster than the entries expire: a website moves to a new server, you edit the hosts file, a VPN re-routes your traffic, or your ISP hands you a different resolver. Windows then keeps answering from memory with yesterday's — or plainly wrong — data, the browser shows DNS_PROBE_FINISHED_NXDOMAIN or ERR_NAME_NOT_RESOLVED, while every other device in the room loads the site fine.

  • A site opens on your phone but not on the PC — the cached record points at an old address
  • You edited the hosts file and the browser keeps connecting to the previous IP
  • A VPN was connected or disconnected and some domains never came back
  • Browsers report ERR_NAME_NOT_RESOLVED or DNS_PROBE_FINISHED_NXDOMAIN
  • You switched to a different DNS server and old, negative answers keep returning

Flushing the cache — Command Prompt and PowerShell

The classic route is Command Prompt: press Win+R, type cmd, press Enter, then run ipconfig /flushdns. Windows answers with a one-line confirmation that the resolver cache was flushed, and that is the whole procedure — no reboot, and in a standard setup no administrator rights either. In PowerShell the equivalent cmdlet is Clear-DnsClientCache; it clears exactly the same cache and is handy when a terminal is already open.

Two companions are worth knowing. ipconfig /displaydns prints the current cache to the console, so you can see what Windows remembered before deciding to clear it. And if you use Chrome or Edge, remember that each browser keeps its own small DNS cache: when a site still misbehaves after the system flush, open chrome://net-internals/#dns (or edge://net-internals/#dns) and click Clear host cache.

What flushing will and won't fix

A flush repairs memory, not plumbing. It works when the failure comes from a stale or corrupted local entry, and it does nothing when the resolver itself is unreachable, the router has lost the line, or the site is genuinely down — in those cases every device on the network fails together. If the symptom returns within minutes, the cache is a messenger, not the culprit: switch the system to a reliable public resolver such as 1.1.1.1, and check whether a browser extension or antivirus is intercepting DNS.

There is no schedule to keep — flushing is a fix on demand, not a maintenance ritual. On a healthy machine, doing it weekly changes nothing, because the cache is simply doing its job. After DNS changes, network moves and VPN sessions, though, a one-second flush saves minutes of confused reloading.

Questions and Answers

Is flushing the DNS cache safe?

Yes. You are only deleting cached lookups, not settings, passwords or Wi-Fi profiles; a few minutes of browsing refill the cache on their own. It is one of the least invasive network fixes there is.

Do I need to restart the PC after ipconfig /flushdns?

No, the effect is immediate. A restart only becomes necessary for deeper repairs, such as resetting Winsock or the TCP/IP stack.

How do I see what is inside the DNS cache before clearing it?

Run ipconfig /displaydns in Command Prompt. It prints every cached record with its type, remaining TTL and value, which helps confirm whether a stale entry is actually the problem.

Know what is included before you buy.

The one-time 30-minute trial covers core tools. PRO-labelled features stay locked until a paid license is activated.

Read next

All articles · FAQ

Write to us: [email protected]