ipconfig /flushdns
Use ipconfig /flushdns to clear the Windows DNS client resolver cache, understand what the command resets, and verify whether a DNS name-resolution problem is actually fixed.
ipconfig /flushdns- Purpose
- Flushes and resets the contents of the Windows DNS client resolver cache so dynamically cached DNS answers, including negative cache entries, are discarded and later lookups can be resolved again.
- Administrator
- Yes — for a straightforward troubleshooting procedure, open Terminal or Command Prompt as administrator before running the command.
- Risk
- Low. The command clears the local DNS client resolver cache; subsequent name lookups may need to query a configured resolver again. It does not reset the network adapter, router, IP address, or browser data.
- Windows support
- Windows 11 and Windows 10
When to use it
- A hostname still resolves to an old address after a confirmed DNS record change
- A failed DNS lookup or negative response may still be cached on the Windows client
- You are deliberately reproducing a DNS name-resolution problem and need to remove cached client answers before retesting
When not to use it
- The PC has no valid network connection, IP configuration, or reachable DNS service
- Every device on the network has the same outage and the evidence points beyond this Windows client
- The problem is browser cookies, cached web content, application data, or a remote website that is unavailable
Steps
- Confirm the symptom is related to hostname resolution rather than a missing network link or invalid IP configuration.
- Open Windows Terminal or Command Prompt as administrator and run ipconfig /flushdns.
- Read the confirmation, then retry the same hostname or DNS test that previously failed. If the problem remains, continue diagnosing the configured DNS servers, connectivity, Hosts file, VPN, proxy, or other name-resolution path instead of repeatedly flushing the cache.
Expected result
Windows reports that it successfully flushed the DNS Resolver Cache. That result confirms the local DNS client resolver cache was cleared; it does not prove that the configured DNS server, internet connection, or destination hostname is working.
What ipconfig /flushdns does
Microsoft documents /flushdns as flushing and resetting the contents of the DNS client resolver cache. During DNS troubleshooting, this can discard negative cache entries as well as other entries that were added dynamically.
Windows uses its DNS client cache so frequently requested names can be resolved without querying a configured DNS server every time. Clearing that cache removes the client-side cached answers; it does not change the DNS server addresses themselves.
How to flush the DNS cache in Windows
Use the command when the evidence points to cached name-resolution data. It is not necessary to perform a network reset just to clear the DNS client cache.
ipconfig /flushdnsOpen Windows Terminal or Command Prompt as administrator.Run ipconfig /flushdns.Confirm that Windows reports the DNS Resolver Cache was successfully flushed.Repeat the same hostname lookup or application test that failed before the flush.
Note: The success message means the cache operation completed. Always retest the original hostname problem separately.
When flushing DNS can help
A useful case is a DNS record that has changed but the Windows client is still using an older dynamically cached answer. Another is a failed lookup that produced a negative response which remains in the client cache. Microsoft DNS client troubleshooting guidance specifically uses ipconfig /displaydns to inspect the cache and ipconfig /flushdns to clear a cached negative response.
Flushing can also be useful before reproducing a DNS problem for diagnostic collection because it removes existing client cache entries and forces the next relevant lookup to proceed without relying on those dynamically cached answers.
What ipconfig /flushdns does not clear
The command is specific to the Windows DNS client resolver cache. It does not clear browser history, cookies, cached page files, router caches, or the cache of an upstream DNS resolver. It also does not release or renew the computer's IP address.
If a browser-specific problem remains while other applications resolve the same hostname correctly, investigate the browser or application path instead of repeatedly flushing Windows DNS.
If ipconfig /flushdns does not fix the problem
First verify the client has a valid IP address, subnet mask, default gateway, and appropriate DNS servers. Microsoft DNS troubleshooting guidance recommends checking this configuration with ipconfig /all before moving deeper into DNS testing.
Then test the failing name deliberately. A persistent failure after the local cache has been cleared can point to the configured resolver, connectivity to that resolver, a Hosts-file entry, DNS suffix behavior, VPN or security filtering, or the authoritative DNS data rather than the local cache.
Note: Do not treat repeated cache flushing as a repair strategy. Once the cache is cleared, a reproducible failure is useful evidence for the next diagnostic step.
ipconfig /displaydns and /flushdns work together
ipconfig /displaydns displays the contents of the DNS client resolver cache, including entries preloaded from the local Hosts file and recently obtained resource records. This can help determine whether the name you are investigating has a cached entry before you clear it.
After ipconfig /flushdns, perform the failing lookup again and compare the result. This before-and-after approach preserves diagnostic value instead of using the flush command blindly.
ipconfig /displaydnsPowerShell equivalent
Microsoft documents Clear-DnsClientCache as deleting the contents of the DNS client cache and states that running it is equivalent to running ipconfig /flushdns. Use whichever interface fits the troubleshooting procedure; running both is unnecessary for the same client-cache clear.
Clear-DnsClientCacheVerify the result, not just the command
A successful flush only verifies that Windows cleared its local DNS client cache. The actual troubleshooting goal is whether the hostname now resolves to the expected address and whether the affected application can reach the intended service.
If the same failure returns immediately, preserve the hostname, resolver configuration, lookup result, and any exact error. Those observations are more useful than repeatedly resetting unrelated networking components.
DISM RestoreHealth FAQ
What does ipconfig /flushdns do?
It flushes and resets the Windows DNS client resolver cache, removing dynamically cached DNS entries including negative cache entries used during name resolution.
Does ipconfig /flushdns change my DNS server?
No. It clears the local resolver cache but does not replace the DNS server addresses configured for the network adapter.
Does ipconfig /flushdns clear browser cache?
No. Browser cookies, history, cached page content, and application-specific caches are separate from the Windows DNS client resolver cache.
What should I see after running ipconfig /flushdns?
Windows should report that it successfully flushed the DNS Resolver Cache. You still need to retry the original hostname or application test to verify whether the actual problem is fixed.
What is the PowerShell equivalent of ipconfig /flushdns?
Microsoft documents Clear-DnsClientCache as equivalent to ipconfig /flushdns for clearing the DNS client cache.
Limitations
- It does not change the DNS servers configured on the adapter, renew the DHCP lease, reset TCP/IP or Winsock, clear browser caches, or restart the router.
- A DNS server, forwarder, proxy, VPN, security product, or other intermediary can maintain its own cache independently of the Windows client, so clearing the client cache cannot remove stale data held elsewhere.