How to clear your local DNS cache
In this guide we’ll walk you through clearing the local DNS cache on various operating systems.
This can help in situations where new DNS records look to have propagated online but you’re still hitting the old servers.
Clear Windows local DNS cache
- Click the Start button and type
cmd
to search for the Command Prompt - Open the Command Prompt
- Run the command
ipconfig /flushdns
to clear the cache
Once flushed, you should receive a message similar to the below:
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
Clear MacOS local cache
- Open the Terminal app
- Run the command
sudo dscacheutil --flushcache
- Run the command
sudo killall -HUP mDNSResponder
Clear Linux local cache
- Open a terminal shell
- Run the command
sudo systemd-resolve --flush-caches
to clear the cache - Run the command
sudo systemd-resolve --statistics
to verify the cache has been cleared
Clear iPhone local cache
- Toggle Airplane mode on and then off again.
- Reboot your phone.
Clear Android local cache
- Open Chrome and navigate to the below URL:
chrome://net-internals/#dns
- Click the Clear host cache button.
- Toggle Airplane mode on and then off again.
- Reboot your phone.