Flush DNS Cache
How to clear your DNS resolver cache to fix stale or broken domain lookups
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).