ipconfig /flushdns
Clear the local Windows DNS resolver cache.
ipconfig /flushdns- Purpose
- Removes cached positive and negative hostname answers so the next lookup asks a configured DNS resolver again.
- Administrator
- Yes — open Terminal or Command Prompt as administrator.
- Risk
- Low; the next lookup may take slightly longer while Windows resolves it again.
- Windows support
- Windows 11 and Windows 10
When to use it
- A hostname still resolves to an old address after a documented DNS change
- A failed lookup remains cached after DNS service has recovered
When not to use it
- The adapter has no network link or valid address
- Every device on the network is offline
- The problem is browser cookies or cached page content
Steps
- Confirm IP connectivity works so the test is actually about name resolution.
- Open an elevated terminal, run the command, and read the response.
- Retry the same hostname; compare with nslookup or ping if it still fails.
Expected result
Windows reports that it successfully flushed the DNS Resolver Cache. This confirms the cache was cleared, not that DNS or the destination works.
Limitations
- It does not change configured DNS servers, clear browser content, or repair a DNS server.
- It cannot restore a router, internet connection, or unavailable website.