🧼 How to Clear DNS Cache on Mac
If websites aren’t loading correctly, changes to DNS aren’t taking effect, or you’re experiencing internet delays, clearing your Mac’s DNS cache can help resolve these issues quickly.
💡 What Is the DNS Cache?
Your Mac stores DNS information temporarily to speed up website access. Over time, this cache may become outdated or corrupted, causing connection problems. Flushing (clearing) the DNS forces your Mac to re-fetch fresh data.
🔧 Step-by-Step: Clear DNS Cache on macOS
1️⃣ Open the Terminal App
- Press Command (⌘) + Space to open Spotlight Search.
- Type Terminal and press Return (⏎).
Or: Go to Applications > Utilities > Terminal
.
2️⃣ Run the DNS Flush Command
Copy and paste the following command into Terminal, then press Return:
Loading...
And after that, this command and press Return
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
You’ll be asked to enter your Mac’s administrator password (you won’t see it as you type — that’s normal).
🧪 What This Command Does
sudo dscacheutil -flushcache
clears the general DNS cache.sudo killall -HUP mDNSResponder
restarts the DNS service to complete the process.
This applies to macOS Ventura, Monterey, Big Sur, Catalina, and most modern versions.
📌 No Confirmation?
That’s expected — the command runs silently with no message. To verify, simply try loading the previously failing websites again.
🧯 Optional: Restart Your Browser or Network
- Quit and reopen your browser (Safari, Chrome, etc.)
- Toggle Wi-Fi off and on
- Restart your Mac for a full network reset (if needed)
✅ DNS Cache Cleared!
Your Mac is now using fresh DNS records. This often fixes website loading issues, domain errors, and slow browsing. Repeat this process anytime you experience similar issues or update DNS settings.