Ever had a webpage not load right or changes to a website not show up? A common fix for this is flushing your DNS cache. But don’t worry — it sounds complicated, but it’s really quite easy, especially on a Mac. Let’s walk through it together.
Your Mac saves info about websites you visit. That’s your DNS cache. It helps load sites faster. But sometimes, that stored info can get outdated or corrupted. When that happens, you might see errors or get stuck looking at old versions of pages. Luckily, there’s a quick fix!
What Is DNS?
DNS stands for Domain Name System. Think of it as a phone book for the internet. When you type a website into your browser, your Mac uses DNS to find the site’s real address. It’s like telling your GPS where you want to go.
Sometimes that GPS keeps old data. So to get things working properly again, we need to give it a fresh reset by flushing the DNS cache.
How to Flush DNS Cache on macOS
You’ll have to use the Terminal app. It’s not scary — promise! Just follow these steps. Different macOS versions use slightly different commands. So we’ve listed them all here.
To get started, open Terminal:
- Press Command + Space to open Spotlight Search
- Type Terminal and press Enter

macOS Ventura (13.x) and Monterey (12.x)
If you’re using Ventura or Monterey, here’s what to do:
- Open Terminal
- Type or copy-paste this command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Press Enter
- Enter your Mac password when prompted (you won’t see characters appear — that’s normal)
That’s it! DNS cache: flushed!
macOS Big Sur (11.x)
Same as above. Just use this command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Then enter your password. Done!
macOS Catalina (10.15)
Use the same command again:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Easy, right? Same for Mojave and High Sierra too!
macOS Mojave (10.14) and High Sierra (10.13)
Here’s your magic line:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
You’re probably noticing a trend here. Apple hasn’t changed this much in recent versions, which makes your job easier!
macOS Sierra (10.12)
This version uses the same command too:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Nice and consistent!
macOS El Capitan (10.11)
This one’s just a little different:
sudo killall -HUP mDNSResponder
No flushcache part here. Just send the refresh signal to mDNSResponder and you’re good to go!
macOS Yosemite (10.10)
Here things get a tiny bit weird. This system uses a different DNS process. Use this:
sudo discoveryutil mdnsflushcache
That makes Yosemite happy and clears the DNS cache.
macOS Mavericks (10.9), Mountain Lion (10.8), Lion (10.7)
If you’re still using these older systems (old school!), here’s your go-to command:
sudo killall -HUP mDNSResponder
Same as many newer versions — Apple brought this one back and stuck with it!
Tips After Flushing DNS
- Clear your browser cache too (Safari, Chrome, Firefox, etc.)
- Restart your browser or the whole Mac if needed
- Your webpages should now reflect updated content
You won’t see any feedback from the terminal after running the command — it just works silently. Trust it!

When Should You Flush DNS?
Here are some perfect times to try it:
- You just updated your website and can’t see the changes
- A site isn’t loading correctly
- You’re getting strange redirects or errors
- You switched your DNS settings
If any of these sound familiar, flushing DNS could save your day.
Fun Fact: Your Mac Quietly Builds DNS Cache All Day
You don’t ask it to do this. It just does. Every time you visit a site, that address is tucked away in a temporary storage box like: “Oh, we’ve been here before. Let’s go faster this time!” Smart, huh?
But if that mini box gets filled with old or wrong directions, your trip gets bumpy. That’s why clearing the cache can be so helpful.
Common DNS Issues That Flushing Can Fix
Let’s break it down nice and simple:
- Website changes not showing
- Sites fail to load or flash 404 errors
- Wrong versions of pages appear
- Redirect loops
If you’re scratching your head, DNS cache could be the culprit.
Still Having Problems?
If DNS flushing doesn’t fix the issue, try these next steps:
- Restart your Wi-Fi
- Check your DNS settings (try Google’s: 8.8.8.8)
- Restart your computer
- Contact your internet provider
Sometimes, the issue is on the server or provider’s end, not your Mac.
Wrapping Up
Flushing your DNS cache on macOS is fast, easy, and safe. It’s a neat trick every Mac user should know. You don’t need to be a tech guru. Just fire up Terminal, type the right command, and boom — clear sailing on the internet again.
Now you have one more handy Mac tip under your belt. Bookmark this guide. Next time your web feels “off,” you’ll be ready to dive in and flush that cache with confidence!