How to flush DNS on Windows, Mac, Linux, iPhone and Android
When a website loads for everyone except you, a stale DNS cache is one of the most common culprits, and one of the easiest to fix. This guide explains what the cache is, then gives the exact steps for every major device.
What DNS does, in one paragraph
Computers connect to numeric addresses like 142.250.72.14, not names like google.com.
DNS (the Domain Name System) is the lookup service that translates one into the other. To save time, your device and browser remember recent answers for a while.
If a website moves to a new server, or a lookup fails once and the failure gets remembered, your device keeps using the bad answer. Flushing throws those saved answers away so the next lookup is fresh.
When flushing DNS helps
- The site works on your phone's cellular data but not on your computer.
- You see "DNS_PROBE_FINISHED_NXDOMAIN", "Server not found" or "This site can't be reached".
- A site recently changed hosting, or you just changed your DNS settings.
It won't help if the site is actually down for everyone. Check that first.
Windows 10 and 11
- Press Win, type cmd, and open Command Prompt.
- Run
ipconfig /flushdns - You should see "Successfully flushed the DNS Resolver Cache."
If that doesn't fix it, also run ipconfig /release then ipconfig /renew to get a fresh network address.
macOS
- Open Terminal (Applications → Utilities).
- Run
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Enter your Mac password. Nothing is printed when it works.
Linux
Most modern distributions use systemd-resolved:
resolvectl flush-caches(or on older systemssudo systemd-resolve --flush-caches)- Using nscd instead:
sudo systemctl restart nscd - Using dnsmasq:
sudo systemctl restart dnsmasq
Your browser's own cache
Chrome and Edge keep a separate DNS cache. Visit chrome://net-internals/#dns (or edge://net-internals/#dns) and click Clear host cache.
Then visit chrome://net-internals/#sockets and click Flush socket pools. Firefox clears its cache when you restart it.
iPhone and iPad
iOS has no flush button, but either of these clears the cache:
- Turn Airplane Mode on, wait ten seconds, turn it off.
- Or restart the device.
Android
- Toggle Airplane Mode on and off, or restart the phone.
- In Chrome, open
chrome://net-internals/#dnsand tap Clear host cache.
Your router
Routers cache DNS too. Unplug it for 30 seconds and plug it back in. That clears its cache for every device at home.
Still broken? Switch resolvers
If the problem comes back, your internet provider's DNS servers may be the issue. Switching to a public resolver such as Cloudflare (1.1.1.1),
Google (8.8.8.8) or Quad9 (9.9.9.9) takes two minutes. Our troubleshooting guide has the steps for each system.