Windows Commands / IT Support Guides
Inspect a stale Windows DNS cache before flushing it
Check whether Windows is reusing an old DNS answer before clearing its local cache.
Environment and inputs: Windows 11 · Command Prompt unless PowerShell is specified
Understand the problem
Write down the hostname, the expected address and when the DNS change happened. Use Command Prompt on the affected computer.
Run the command
Run ipconfig /displaydns and look for the hostname. Save the relevant entry before deciding whether to run ipconfig /flushdns. The second command clears the Windows DNS client cache.
ipconfig /displaydns
ipconfig /flushdns
Read the output
Compare the cached address with the expected one. The TTL is the time the cached answer can remain valid. If you see no matching entry, check what the configured DNS resolver currently returns.
Choose the next step
If a flush is appropriate, retry the same application request afterward. If the old address returns, check the resolver and whether the application uses a separate DNS cache.
Before making changes
Gather the output before clearing the cache. Flushing it affects the local computer and does not change records on the DNS server.