If your DNS cache is outdated or corrupted, it can cause pages to fail, load incorrectly, or redirect you to the wrong server.
Luckily, the fix is simple: you just need to flush the DNS cache on macOS.
✅ Step 1: Open Terminal
- Press Command (⌘) + Space to open Spotlight Search
- Type Terminal and hit Return
✅ Step 2: Paste This Command
Copy the following line and paste it into Terminal, then press Return:
Terminal
Loading...
What does this command do?
It tells macOS to purge its DNS cache — a temporary record of websites you’ve visited.
After running the command, your Mac is forced to re-fetch the latest DNS info.
This helps resolve:
- DNS lookup failures
- Wrong IP redirections
- Loading issues with new domains
🎉 That’s It — DNS Cache Cleared
You’ve just refreshed your Mac’s network memory. Now your DNS is:
- Clean
- Updated
- Ready to resolve sites properly again
💡 Tip: Repeat this if you switch Wi-Fi networks, use a VPN, or change your DNS provider.