How to Flush DNS Cache on Mac (All macOS Versions)
Flushing DNS on a Mac involves two Terminal commands rather than one because macOS splits DNS responsibility between a cache store (dscacheutil) and an active resolver daemon (mDNSResponder). Both need resetting for a complete flush.
The Commands
Open Terminal: press Command + Space, type Terminal, press Enter.
Run: sudo dscacheutil -flushcache
Enter your Mac password when prompted. No characters display as you type — this is normal.
Run: sudo killall -HUP mDNSResponder
No success message appears. Silence means it worked.
One-Line Version
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Enter your password once. Both commands run in sequence.
flush dns mac — macOS Version Compatibility
macOS High Sierra through Sonoma (2017–present): the commands above are correct. macOS Sierra (10.12): same commands work. OS X Yosemite (10.10): sudo discoveryutil udnsflushcaches OS X Mavericks (10.9) and earlier: sudo killall -HUP mDNSResponder only.
If you are running a supported macOS (2017 or later), the two-command approach is correct.
macos flush dns — Why Two Commands?
macOS DNS uses two components. dscacheutil stores cached lookup results. mDNSResponder is the background process that handles DNS queries in real time. The first command empties the cache store; the second restarts the daemon so it starts fresh. Running only one sometimes works — running both is reliable.
flush dns mac os — What to Check if the Problem Persists
Safari caching pages independently: Hold Shift and click the reload button in Safari to force a fresh load bypassing page cache.
Chrome has its own DNS cache: Go to chrome://net-internals/#dns, click Clear host cache. Then go to chrome://net-internals/#sockets, click Flush socket pools.
DNS propagation is the real issue: Flushing your local cache makes your Mac go ask the DNS server for fresh data. If the server itself has not updated yet, you get the same old answer. Check whether the problem is propagation using: dig @1.1.1.1 yourdomain.com vs dig @8.8.8.8 yourdomain.com — if both return the same result you are seeing locally, the update has not propagated yet.
Domain expired: A site that was working yesterday and now returns errors may have an expired domain. A WHOIS lookup shows expiry status in seconds — faster than extensive DNS troubleshooting.
mac flush dns cache — Clearing Browser Cache vs DNS Cache
These solve different problems. DNS cache (cleared with the Terminal commands) stores which IP address a domain name resolves to. Browser cache (cleared in browser settings) stores web page files, images, and stylesheets.
After a website moves to a new server, you may need to clear both: flush DNS so your Mac gets the new IP address, then clear browser cache so Safari or Chrome downloads the new page files rather than displaying old ones.
Verifying the Flush Worked
After flushing, test by visiting a domain you have not visited recently — this requires a fresh DNS lookup. If it loads correctly where it did not before, the flush resolved the problem.
Never lose a domain again
Track every domain you own in one dashboard. Free for up to 15 domains.
