Contents
8 sections · 5 min read
Mac Terminal window showing sudo dscacheutil flushcache command
Domain Management

How to Flush DNS Cache on Mac (All macOS Versions)

A
Domain 360 Team
·July 12, 2026·5 min read

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.

What Are the Commands to Flush DNS on a Mac?

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.

Is There a One-Line Version?

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Enter your password once. Both commands run in sequence.

Does the Command Differ Across macOS Versions?

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.

Does Flushing DNS Fix Wi-Fi Connectivity Issues?

No, and this is a common mix-up worth clearing up. Flushing DNS only affects how domain names resolve to IP addresses — it does nothing for a Wi-Fi connection that's dropping, slow, or failing to connect at all, since that's a network-layer problem happening before DNS is ever involved. If your Mac can't reach the internet at all, or other apps besides your browser are also failing, the fix is toggling Wi-Fi off and on, or checking System Settings > Network, not a DNS flush. Flushing DNS specifically fixes the narrower problem of a site loading incorrectly, showing outdated content, or resolving to the wrong server after a known change — while your overall internet connection works fine.

Why Does macOS Need 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.

What Should You 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.

DNS Cache vs Browser Cache: What's the Difference?

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.

How Do You Verify 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.

Troubleshooting the same issue on a different OS? See how to flush DNS on Linux. And if you're deciding between DNS resolution protocols rather than just clearing a cache, DNS over TLS vs DNS over HTTPS explains the difference.

Quick Answers

How do I flush DNS on a Mac?
Open Terminal (Spotlight, type Terminal, press Enter) and run these two commands one after the other: sudo dscacheutil -flushcache and then sudo killall -HUP mDNSResponder. Enter your Mac password when prompted. There is no success message — the silence means it worked.
Why does Mac DNS flushing need two commands?
macOS uses two separate DNS-related services. dscacheutil handles the local cache store, and mDNSResponder is the active daemon that resolves DNS queries. The first command clears the cache; the second restarts the daemon. You need both for a complete flush.
Does the command differ for different macOS versions?
The two-command approach works for macOS High Sierra through current releases. Very old versions like Snow Leopard and Lion used different commands. If you are running a supported macOS (2017 or newer), the commands above are correct.
How do I open Terminal on a Mac?
Press Command + Space to open Spotlight, type Terminal, press Enter. Alternatively, open Finder, go to Applications, Utilities, and double-click Terminal.
Will flushing DNS on Mac cause any problems?
No. Flushing DNS removes cached records so they are fetched fresh from DNS servers. There are no side effects on your applications, files, browser history, or settings. The only outcome is that the next DNS lookup for each domain takes a fraction of a second longer while fresh data is retrieved.

Never lose a domain again

Track every domain you own in one dashboard. Free for up to 15 domains.