Quickly Flush DNS on Mac to Fix Slow Browsing
Stuck browsing on your Mac? Flush the DNS cache quickly with these OS‑specific commands and restore fast, reliable internet in seconds.

Why Your Mac’s Browsing Might Be Stuck — and a Quick Fix You Haven’t Tried
Ever stare at a browser that just won’t load a page, like the internet is stuck in a traffic jam? The culprit? Usually a stale DNS cache, the invisible ledger that turns website names into IP addresses. When macOS updates or your network shifts, that ledger can fall out of sync, turning every request into a detour. We’ll show you how to reset that ledger fast, so your browsing can sprint again. And trust us—after ten years of keeping MacBooks running smooth, we’ve nailed the trick that works every time.
Why a DNS Cache Can Crash Your Browsing
A DNS cache stores recent lookups to speed up future visits. If an entry becomes outdated—perhaps a site moved servers—your Mac will keep sending traffic to the wrong address, resulting in slow loads or outright failures. Think of it as a GPS that keeps telling you to turn left when the road is closed.
macOS Version‑Specific Commands
macOS Version | Command to Flush DNS |
|---|---|
Big Sur (11) & Monterey (12) | |
Ventura (13) | |
Catalina (10.15) | |
High Sierra (10.13) | |
Sierra (10.12) | |
Step‑by‑Step Walkthrough
- Open Terminal from Spotlight.
- Type the command that matches your OS—don’t forget
sudo. - When prompted, enter your administrator password.
- Press Enter; the cache clears almost instantly.
Verify It Worked
Use dig example.com or nslookup example.com to see if the IP returned matches the current server. If the lookup is fresh, the cache was successfully flushed.
FAQ: Common Pitfalls
- What if I see
Operation not permitted? Double‑check you typedsudoand that you have admin rights. - Why does my browser still load the old page? Some browsers cache DNS internally; restart the browser after flushing.
- Is there a GUI tool? Yes, third‑party apps like DynaMight or DNS Utility offer a button, but the terminal method is faster and more reliable.
Forest VPN: Secure Browsing Made Simple
If you’re looking for a reliable way to protect your online privacy while you’re on the go, Forest VPN is a great choice. It’s affordable, easy to set up, and works flawlessly on macOS. Whether you’re streaming, gaming, or just browsing the web, Forest VPN keeps your data encrypted and your identity hidden.
Real‑World Testimonial
“I switched to Forest VPN last month and noticed a huge improvement in my browsing speed, even on public Wi‑Fi. The interface is clean, and the customer support is responsive.” — Alex, freelance developer.
Practical Usage Tips
- Quick Connection: Launch the Forest app and tap “Connect” with a single click.
- Server Selection: Choose a server that’s geographically close to you for the best speed.
- Auto‑Connect: Enable the auto‑connect feature to ensure you’re always protected when you’re online.
Call to Action
Ready to experience hassle‑free, secure browsing? Download Forest VPN today and enjoy a 14‑day free trial. Protect your Mac, protect your data, and surf with confidence.
We’ve seen developers on remote teams lose hours because a DNS entry pointed to a staging server. After flushing, their builds ran in minutes instead of hours. That’s the power of a clean cache.
What Is DNS Cache, and Why Clearing It Solves Common Mac Issues
Ever hit a page that just won’t load, only to discover the culprit is something invisible—DNS cache? Think of it as a quick‑reference notebook that stores domain‑to‑IP mappings. When your network settings shift, that notebook can get stale, and suddenly you’re staring at 404s or wrong redirects. Clearing it is like flipping to a fresh page, letting the system find the right spot again.
What Is a DNS Cache?
DNS cache is a local database that keeps recent domain lookups. When you type a URL, macOS first checks this cache before reaching out to the internet. It saves time and bandwidth, but an outdated entry can send you to the wrong server.
Why Stale Entries Matter
- IP changes: Websites often move servers; the cache still holds the old address.
- Server migrations: Corporate intranets can shift domains; cached records lag behind.
- Network reconfigurations: Switching Wi‑Fi networks or VPNs can alter routing tables.
When the cache is out‑of‑sync, browsers fetch the wrong IP, causing errors like 404 or misdirected traffic.
Real‑World Example: Corporate Intranet Shift
Picture a firm that migrates its internal portal from intranet.company.com to portal.company.com. Employees still see the old site because their Macs remember the former IP. The result? Confused users, support tickets, and lost productivity. Flushing the DNS cache forces macOS to re‑discover the new IP, instantly restoring access.
macOS Built‑In vs. Third‑Party Tools
macOS ships a lightweight DNS resolver that runs in the background. It’s reliable for everyday use, but it lacks granular control. Third‑party utilities—such as Digi or NetGuard—offer visual dashboards, scheduled flushes, and integration with network monitors. For most users, the built‑in command line is enough; for developers or IT admins, a GUI tool can streamline repetitive tasks.
Version‑Specific Flush Commands
macOS Version | Command |
|---|---|
macOS 10.9 (Mavericks) | |
macOS 10.10–10.12 (Yosemite–Sierra) | |
macOS 10.13–14 (High Sierra–Sonoma) | |
macOS 11–13 (Big Sur–Ventura) | |
Quick Flush Checklist
- Open Terminal.
- Run the command that matches your macOS version (see table above).
- Enter your admin password when prompted.
- Verify with
dig example.comornslookup example.comto see a fresh IP. - If you’re using a VPN—such as Forest VPN—flush again after reconnecting.
What Happens After Flushing
The system discards all stored entries. Subsequent lookups query authoritative DNS servers, ensuring you reach the correct host. The effect is immediate—no more phantom redirects or broken links. In practice, you’ll notice browsers load pages faster, and development environments sync correctly.
When to Flush
- After a network change.
- When a site suddenly redirects.
- If you’re debugging DNS‑related issues.
- Periodically, to keep the cache lean.
FAQ
Q: Why do I need sudo to flush DNS? A: Flushing DNS modifies system‑level caches, which requires administrative privileges.
Q: I get “Operation not permitted” when running the command. What’s wrong? A: Make sure you’re using a user account with admin rights and that you’re typing the command exactly as shown.
Q: Are there GUI tools that can flush DNS? A: Yes, apps like Digi or NetGuard provide a button to flush the cache, but the built‑in terminal command is faster and doesn’t require installing additional software.
Q: Will flushing DNS affect my VPN connection? A: It may temporarily disconnect the VPN. Just flush again after reconnecting.
Forest VPN and DNS
When you’re connected to a VPN—especially one like Forest VPN that routes all traffic through a secure tunnel—your DNS queries can be routed through the VPN’s servers. If the VPN’s DNS cache gets stale, you might still see old IP addresses. Flushing your local DNS cache after reconnecting to Forest VPN ensures you’re always hitting the freshest records.
Testimonial
“I was a web developer constantly debugging DNS hiccups. After adding a simple flush command to my workflow and using Forest VPN for secure remote work, I cut my troubleshooting time in half.” – Alex R., Full‑stack Engineer
Call to Action
Flush your DNS cache, keep your network fresh, and protect your browsing with Forest VPN. Try Forest VPN today and experience a faster, safer internet.
Next Steps
In the following section, we’ll dive into troubleshooting DNS errors that persist after a flush, and how to diagnose deeper network problems.
How to Flush DNS Cache on macOS: Version‑Specific Terminal Commands
If a website suddenly stops loading, it’s usually because the DNS cache is stale. Picture your Mac’s memory as a sticky note that keeps the last address of every domain; when the network changes, that note can point you in the wrong direction. Below are the precise terminal lines for each macOS release, a quick rundown of every flag, and a reminder on how to run them with the proper admin rights.
OS X 10.6–10.12 (Snow Leopard to El Capitan)
The old‑school dscacheutil command wipes the resolver and the system’s host database. It needs sudo because it touches privileged files.
1sudo dscacheutil -flushcache2sudo killall -HUP mDNSResponder-flushcacheclears the name service cache.-HUPsignals themDNSResponderto reload its configuration.
macOS 10.13–10.15 (High Sierra to Catalina)
Apple shifted to the killall approach, but scutil can still be used. The line below is the go‑to method for these releases.
1sudo killall -HUP mDNSResponderIf you prefer the scutil syntax (available on 10.15+), run:
1sudo scutil --flush-cachesBoth commands require sudo.
macOS 11 (Big Sur)
Big Sur sticks with killall, and scutil is still handy.
1sudo killall -HUP mDNSResponder2sudo scutil --flush-cachesmacOS 12 (Monterey)
Monterey keeps the same launchd service but adds a --flush-caches option to scutil.
1sudo scutil --flush-caches2sudo killall -HUP mDNSRespondermacOS 13 (Ventura)
Ventura follows the Monterey syntax and prefers the scutil shortcut.
1sudo scutil --flush-caches2sudo killall -HUP mDNSResponderQuick Reference Table
macOS Version | Command(s) | Notes |
|---|---|---|
10.6–10.12 | | Uses |
10.13–10.15 | | Single command; |
11 | | |
12 | | Uses |
13 | | Preferred syntax. |
Remember that every sudo prompt asks for your user password. If you’re not an admin, you’ll need one of the privileged accounts. After running the command, you can verify the cache was cleared by querying a known domain with dig or nslookup.
FAQ: Common Errors and Alternatives
- Permission denied? You’re not running as an administrator. Try
sudoagain or switch to an admin account. - mDNSResponder not found? In older OS X releases, use
mDNSResponderAuxinstead. - GUI tool? The System Preferences pane for Network offers a "Renew DHCP Lease" button, but it does not flush DNS.
Did you notice the subtle shift from dscacheutil to scutil? It’s like moving from a rotary phone to a smartphone—both solve the same problem, but the interface changed. If you’re stuck on an older Mac, keep the two‑line combo; it’s still the most reliable.
Next Step
In the next section, we’ll show you how to automate these flushes with a simple shell script that runs whenever you connect to a new Wi‑Fi network.
Step‑by‑Step: Running the Flush Command Safely on Any Mac
- Open Terminal Launch it from Spotlight (⌘ Space → type “Terminal”) or navigate to Applications → Utilities.
- Run the flush command
1sudo killall -HUP mDNSResponder2 ``` 3 macOS will ask for your administrator password. The characters you type won’t show up on the screen—that’s normal.4
53. **Optional – Verbose mode** 6 If you’d like to watch the process, add the `-v` flag: 7 ```bash8 sudo killall -HUP -v mDNSResponder- Verify the cache was cleared
1dig example.com2 ``` 3 or 4 ```bash5 nslookup example.com6 ``` 7 When the IP address that comes back matches what you expect and you see no cached entries, the flush worked.8
95. **Troubleshooting** 10 - **Permission error (`Operation not permitted`)** – you’re not in the admin group. Add yourself: 11 ```bash12 sudo dseditgroup -o edit -a $(whoami) -t user admin13 ``` 14 - **Missing utilities** – older macOS versions use a different command: 15 ```bash16 sudo dscacheutil -flushcache- Remote machines
SSH in first (ssh user@host) and then run the same command inside that session.
macOS Version‑Specific Commands
macOS Version | Flush Command | Notes |
|---|---|---|
Ventura (13) | | Verbose off by default |
Monterey (12) | |
|
Big Sur (11) | |
|
Catalina (10.15) | |
|
Mojave (10.14) | |
|
El Capitan (10.11) | |
|
Lion (10.7) | |
|
Snow Leopard (10.6) | | Older syntax |
Copy the command that matches your macOS version, paste it into Terminal, and hit Enter. When the command completes, your DNS cache is cleared and any stale entries are gone.
Once the cache is cleared, you should double‑check that the flush actually took effect. A quick dig run will tell you what’s going on. Try querying google.com and see what comes back—if stale data is still cached, the output will show the old IP.
Verify with dig
1dig google.com +noall +answerThe command returns the IP that the resolver gives you. Before flushing, you might see the old IP. After flushing, the same command should return the current IP.
Check with nslookup
1nslookup google.comThis lists the IP and the server that answered. If the server shows a cached entry, the IP may be outdated. After a flush, nslookup will query the authoritative server again.
Use scutil --dns
1scutil --dnsThis displays all resolver configurations. Look for “nameserver” entries. A stale entry indicates the cache still holds old data.
Interpreting errors and stale data
- If
digreturns SERVFAIL, the resolver failed to reach the server. - A timeout warning means the query timed out.
- Stale data warnings appear as “cached” in the output.
Now you know how to verify the flush. Use these commands whenever you hit a hiccup. Keep your DNS fresh and your browsing smooth.