Clear Mac DNS Cache Fast: Step-by-Step Guide
Stuck on a broken website? Learn how to flush your Mac’s DNS cache quickly and keep browsing fast, accurate, and secure with our step‑by‑step guide.

Ever gone to a website and hit a stubborn error? That’s the DNS cache drama.
On Macs, there's a local library of recent domain lookups—a quick‑look database that speeds up browsing. But when that library gets stale, a smooth page can turn into a glitchy nightmare. Stick around and we’ll show you how to refresh that cache on every macOS version.
What exactly is a DNS cache, and why does it matter? Think of it as a sticky note that remembers where a website lives. When you visit a domain, your Mac records its IP address in that note. If the note is wrong, the Mac sends traffic to the wrong place, causing slow loads or broken pages.
A developer found a site still pointing to an old IP after a server migration—because the cache hadn’t been flushed. That mix‑up cost the team hours of debugging, turning a smooth launch into chaotic scramble.
Keeping the cache fresh brings three major perks: faster access, accurate routing, and better security. Faster access is like having a shortcut instead of a detour. Accurate routing ensures traffic reaches the right destination, avoiding misdirected requests. Better security means your Mac is less likely to be tricked by phishing sites that hijack old DNS records.
Next, we’ll walk through the exact commands to reset this cache on every macOS version, from Ventura down to Sierra. Stay tuned, because a clear cache is the first step to a smoother, safer browsing experience.
How to Clear DNS Cache on Mac
You’ve all stared at a blinking loading icon, only to find the culprit is a forgotten DNS entry. A DNS cache is like a sticky note that remembers where a website lives, so your Mac can reach it faster. But when that note gets stale or corrupted, sites break, security warnings pop up, and developers hit roadblocks.
The Domain Name System translates names like apple.com into machine‑readable IPs. macOS keeps a local copy of recent lookups in a DNS cache to cut lookup time. Apple’s Network Configuration Guide recommends clearing this cache when you encounter connectivity hiccups. A typical cache holds around 4,000 entries, and TTL values usually range from 5 minutes to 24 hours.
Imagine your cache as a library that only knows the books you’ve read recently. If a book’s location changes, the library’s record is wrong, leading to confusion. Stale DNS records can misdirect traffic, expose you to phishing sites, or prevent local development servers from being reached.
Below is a conceptual diagram:
- User types domain
- System checks local cache
- If hit, returns cached IP
- If miss or stale, queries authoritative server
- Stores fresh result in cache
macOS Version‑Specific Commands
macOS Ventura, Monterey, Big Sur, Catalina
1sudo dscacheutil -flushcache; sudo killall -HUP mDNSRespondermacOS Mojave, High Sierra, Sierra
1sudo killall -HUP mDNSRespondermacOS El Capitan and earlier
1sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderHow We Flush the Cache
- Open Terminal via Applications → Utilities or spotlight.
- Type the appropriate command for your OS.
- Hit Return; you’ll be prompted for your admin password.
- Enter the password; no output means success.
- Close Terminal and restart any browsers.
Verifying the Flush
Use tools like dig or nslookup. For example, running dig example.com +nocache should return a fresh TTL and no cached server line. If the IP changes after a flush, you’ve succeeded.
FAQ
Q: Why do I still see old sites after flushing? A: Browsers cache DNS too; close and reopen them.
Q: I get “Permission denied” when running sudo. A: Ensure your account has admin rights. Try launching Terminal from the Applications folder.
Q: Is there a GUI way? A: In System Preferences → Network → Advanced → DNS, remove and re‑add servers to reset.
Q: How often should I flush? A: Only when problems arise or after changing DNS settings.
Takeaways
- Your DNS cache is a performance booster, but stale entries can break sites.
- Use the correct command for your macOS version; the two‑step command works on Ventura and newer.
- Verify with dig or nslookup to confirm freshness.
- A quick flush is low risk and high reward for any Mac user facing DNS quirks.
- Remember, browsers also keep DNS caches—restart them after a system flush.
Ready to give your Mac a fresh start? Try the command now and watch the loading icons disappear.