Windows DNS cache: what ipconfig /flushdns can and can't fix
See what ipconfig /flushdns clears on Windows, when a cached DNS answer makes it useful, and what to check if the problem remains.
One site refuses to open on this Windows PC, even though other sites work? ipconfig /flushdns is a sensible one-time check when Windows may be holding an old DNS answer or a cached failed lookup. It clears the Windows DNS Client resolver cache. It does not change the site's DNS records or clear every resolver between your PC and the site.
DNS looks up a name such as example.com and returns records that help an app find the service. Windows keeps some DNS answers locally so it can reuse them. A failed lookup can also be cached. Microsoft's DNS query and cache explanation describes how the client checks its local cache before asking a configured DNS server, and how cached records follow their time to live (TTL).
That makes a flush useful in a narrow case: the answer in this PC's cache is stale or negative, while the DNS information available through the normal lookup path has changed. If the problem is elsewhere, clearing this one cache will not repair it.
When a DNS cache flush is worth trying
Try it once when a particular hostname fails on one Windows PC, especially if another device on the same network can reach it. It is also reasonable after a site or service has changed its address, or after a temporary lookup failure that may have been cached.
It is less useful when every site is offline, several devices fail on the same network, or only one app has the problem. Those patterns point beyond this PC's DNS cache: the connection, a shared DNS server, a VPN or proxy, the app itself, or the site may need attention.
Flush the Windows DNS client cache
Microsoft lists the ipconfig command for Windows 10 and Windows 11. You do not need to change a setting or install another tool.
- Open Command Prompt or a Windows Terminal tab.
- If you want to inspect the local cache first, run
ipconfig /displaydnsand press Enter. The output can be long. Microsoft's ipconfig command reference says it can include entries loaded from the local Hosts file as well as recently resolved records. - Run
ipconfig /flushdnsand press Enter. The same reference says this resets the DNS client resolver cache, including cached negative answers and dynamically added entries. - Retry the same hostname in the same app. A success message means Windows accepted the cache-reset request; it does not prove the site is reachable or that the DNS server has the answer you expect.
If the command reports an error, keep the exact message and investigate that instead of running unrelated network-reset commands. On a managed work or school PC, ask the administrator before changing DNS settings or local name mappings.
Check what the configured DNS server returns
If the site still fails, run nslookup example.com. at the same prompt. Replace example.com. with the hostname from the address you are trying to open, keeping the final dot.
Microsoft's nslookup command reference applies to Windows 10 and 11. It explains that omitting a server argument makes the command use the default DNS name server, and that a trailing dot avoids default search-suffix expansion in configurations that use one. Microsoft's DNS client troubleshooting guide notes that nslookup does not use the Windows client cache; it queries the configured DNS server.
Use the result as a clue, not a final verdict:
- The query times out or cannot find the name. Check whether the configured DNS server is reachable and whether the network or VPN that provides it is connected. On a work network, the right next step may be your IT team.
- The query returns an answer, but one app still cannot connect. DNS through the configured server is responding. Check that app's connection, proxy or VPN settings, then the service itself.
- The same hostname fails on several devices on the same network. The fault is more likely in a shared resolver, network path or the site's DNS than in one PC's cache.
- A different DNS answer appears on different networks. Do not assume one fixed IP address is correct. Check with the service owner or network administrator if the exact destination matters.
Windows can also use entries from a local Hosts file. Microsoft describes the client checking its cache, then the Hosts file, then the DNS server. Clearing the cache does not edit a Hosts file or change a managed network policy. If a local mapping appears to be involved, get help from the person who manages the PC rather than deleting unfamiliar entries.
What ipconfig /flushdns cannot fix
A flush only resets the Windows DNS client cache on the computer where you run it. A router or upstream DNS resolver can maintain its own cache, and DNS records are served and cached across separate systems. Those caches are not cleared by a command on your PC; they expire according to their own rules, including the record's TTL. See the DNS caching model in RFC 1034 .
The command also cannot correct an incorrect DNS record at its source, make an unreachable DNS server respond, restore a broken internet connection, or bring a website back online. If the same issue remains after one flush, repeating it is unlikely to add useful evidence. Compare another device and the nslookup result, then follow the layer that still fails.