DNS cache is like a shortcut list your device keeps to load websites faster. When it gets stale or corrupted, you can see errors like DNS_PROBE_FINISHED_NXDOMAIN, the wrong site loading, or pages that won’t update. Flushing the cache clears those bad entries and forces fresh lookups.
This guide shows how to flush DNS on Windows, macOS, Linux, iOS, and Android.
When should you flush DNS?
Use this fix if you notice:
- A website won’t load, but works on other devices
- A domain recently changed servers but you still see the old site
- DNS-related errors in your browser
- You edited your
hostsfile and changes don’t apply
Windows 10/11
Open Command Prompt as Administrator and run:
ipconfig /flushdns
You should see: “Successfully flushed the DNS Resolver Cache.”
macOS (Ventura, Sonoma, Monterey)
Open Terminal and run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Enter your password when prompted. There’s no success message, but the cache is cleared.
Linux (systemd-resolved)
Most modern Linux distros use systemd-resolved:
sudo resolvectl flush-caches
To verify:
resolvectl statistics
If your distro uses nscd or dnsmasq, restart those services instead.
Android
Android doesn’t have a universal “flush DNS” button, but you can clear it by:
- Toggling Airplane mode on/off
- Restarting the device
- Turning Wi‑Fi off and back on
For a more persistent fix, change your DNS provider in Wi‑Fi settings.
iOS (iPhone/iPad)
Use one of these quick methods:
- Toggle Airplane mode on/off
- Restart the device
- Forget and rejoin the Wi‑Fi network
Router DNS cache (optional)
If multiple devices are affected, flush DNS on the router:
- Restart the router (quickest)
- Or log in and clear DNS cache if your firmware supports it
Troubleshooting tips
- If a site still won’t load, try a different DNS resolver (e.g., Cloudflare 1.1.1.1 or Google 8.8.8.8).
- Use our DNS Lookup Tool to confirm DNS records.
- Check propagation with DNS Propagation after a DNS change.
Summary
Flushing DNS is safe, fast, and often fixes “can’t reach website” errors. If problems persist, the issue is likely with the website’s DNS records or your network’s DNS provider.