Flush it in Terminal
- Open Applications > Utilities > Terminal.
- Run
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Enter your Mac password when asked. Nothing appears as you type it. Press Return.
There's no message when it works. Apple documents sudo killall -HUP mDNSResponder as the command for current macOS. The dscacheutil part is harmless and clears the older cache too.
When it helps
- A site loads on your phone but not on your Mac.
- A site or server moved to a new address and your Mac still goes to the old one.
- You changed DNS servers or edited
/etc/hosts.
It won't fix a Wi-Fi connection that's down or a site that's down for everyone.
Is it safe?
Yes. The cache is kept in memory, not in files, and the Mac fills it again as you browse. Nothing else is deleted. A restart also clears it.
The faster way: Caretaker
Questions
Does restarting a Mac flush DNS?
Yes. The DNS cache is held in memory, so a restart clears it.
Is it safe to flush DNS on a Mac?
Yes. It only clears saved addresses. Your Mac looks them up again the next time you visit each site.
