How to Flush Your DNS Cache on Windows, Mac, and Linux
Your computer caches DNS lookups so it doesn't have to ask repeatedly. When a website moves to a new IP, your old cached entry can keep loading the wrong (or missing) server until the cache expires. Flushing the DNS cache is the immediate fix — and the right first step for any "this site loads for everyone except me" mystery.
Windows
Open Command Prompt (search → cmd → Run as administrator), then run:
ipconfig /flushdns
You'll see Successfully flushed the DNS Resolver Cache. That's it — the next lookup will hit live DNS.
Mac
Open Terminal and run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Enter your password. Both commands need to run — the first flushes the system cache, the second restarts the multicast DNS responder so apps pick up the change.
Linux
Depends on which resolver you use:
- systemd-resolved:
sudo systemd-resolve --flush-caches - dnsmasq:
sudo systemctl restart dnsmasq - nscd:
sudo systemctl restart nscd
Most modern desktop distros use systemd-resolved — that's the first one to try.
Browser DNS cache
Browsers also cache DNS independently. To flush Chrome: visit chrome://net-internals/#dns and click Clear host cache. Firefox: about:networking#dns, click Clear DNS Cache.
When to flush
- A site moved hosts and now won't load for you
- You changed your DNS server (Cloudflare, Google) and want immediate effect
- You suspect DNS poisoning
- You're troubleshooting after editing your hosts file
If flushing doesn't help, the issue is the DNS servers themselves — try 1.1.1.1 or 8.8.8.8 to rule that out.
Try it now
Curious what your IP is showing the world right now? Check your IP address & location instantly with our free tool — no signup, nothing stored. Or trace any other IP to see its geolocation, ISP, and network details.