Flush DNS Cache
How to clear your DNS resolver cache to fix stale or broken domain lookups. Step-by-step instructions for flushing DNS on Windows, Mac, and Linux.
Flushing your DNS cache forces your computer to look up fresh addresses for every website instead of relying on stored (potentially outdated) records. Do this when a domain isn't resolving, you just changed DNS servers, or a website moved to a new address and your machine is still pointing to the old one.
- Open Terminal (search for it in Spotlight or find it in Applications > Utilities)
- Run the following command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Enter your admin password when prompted
There's no success message – if it returns to the prompt without an error, it worked. To verify the cache was cleared, run sudo killall -INFO mDNSResponder and check Console.app for a log entry showing the cache size reset.
Frequently Asked Questions
What does the DNS cache actually do?▾
Your computer keeps a local list of recently visited domain names and their IP addresses so it doesn't have to look them up every single time. This speeds things up, but if a record changes (like when a site moves servers), the stale entry can point you to the wrong place.
Will flushing DNS break anything?▾
No. The only effect is that your next visit to each website will take a fraction of a second longer while your computer fetches fresh DNS records. Everything gets re-cached automatically as you browse.
How often should I flush my DNS cache?▾
Only when you have a reason to. Common situations: you changed your DNS server, a website isn't loading that works for others, you're seeing an old version of a site after a domain migration, or you're doing DNS-related troubleshooting. There's no benefit to flushing on a schedule.
I flushed DNS but the site still won't load. What now?▾
Your browser has its own DNS cache separate from the OS. In Chrome, go to chrome://net-internals/#dns and click Clear host cache. You can also try clearing your browser cache or restarting the browser entirely. If the site still doesn't load, the issue is likely upstream (the site itself, your ISP, or your DNS provider).
Related Guides
Change DNS Settings
How to change your DNS server for faster and more reliable internet. Covers popular DNS providers like Cloudflare and Google on all major platforms.
VPN Basics
How to connect to a VPN, what it actually does, and how to fix common issues. Covers setup on all platforms, split tunneling, and troubleshooting drops.
Wi-Fi vs Internet: Why You Can Have One Without the Other
What it means when you are connected to Wi-Fi but have no internet, and how to fix it. Covers router resets, DNS, DHCP, and ISP-side issues.
IPv4 vs IPv6
What IPv4 and IPv6 are, why IPv6 exists, and whether you need to care. A plain-language explanation of internet protocol versions and compatibility.
Understanding IP Addresses
What IP addresses are, how to find yours, and what they reveal about you. Covers public vs. private IPs, IPv4 and IPv6, and common privacy concerns.
Hotspot and Tethering
Share your phone's internet connection with your laptop via Wi-Fi hotspot or USB tethering. Setup and troubleshooting for iPhone and Android devices.