Your operating system and browser store recently resolved DNS records in a local cache to speed up future lookups. When DNS records change (a website moves servers, for example) your cached records may be outdated and cause connection failures. Flushing the cache forces your device to fetch fresh records.
How to Flush DNS by Operating System
| OS | Command / Steps |
|---|---|
| Windows 10/11 | Open Command Prompt as Admin: ipconfig /flushdns |
| macOS (Ventura/Sonoma) | Terminal: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
| macOS (older) | Terminal: sudo killall -HUP mDNSResponder |
| Ubuntu/Debian Linux | sudo systemd-resolve --flush-caches |
| ChromeOS | Open chrome://net-internals/#dns and click "Clear host cache" |
Flush DNS in Your Browser
Browsers have their own DNS cache separate from the OS:
- Chrome / Edge: Open
chrome://net-internals/#dns, click "Clear host cache" - Firefox: Open
about:networking#dns, click "Clear DNS Cache" - Safari: Enable Develop menu > Develop > Empty Caches (does not specifically clear DNS, but restarting Safari flushes it)
When Should You Flush DNS?
- After changing a domain's DNS records (and waiting for TTL to expire)
- When a website is unreachable but others can reach it
- After a suspected DNS poisoning attack
- When switching between DNS providers
- After updating your VPN configuration
Is It Safe to Flush DNS?
Yes. Flushing the DNS cache does not delete any important data. The only effect is a brief slowdown as your device re-resolves domain names it has cached. They are repopulated automatically as you browse.
People Also Ask
- What does a DNS flush do?
- It deletes all locally cached DNS records. Your device then fetches fresh records from DNS servers the next time it needs to resolve a domain name.
Related: What is DNS? | DNS poisoning | DNS Lookup