Caretaker Download

Guide

How to flush the DNS cache on a Mac

Your Mac remembers the address of every website it looks up. If a site moved, that memory can point to the old address. Flushing it makes the Mac look up each site again.

Flush it in Terminal

  1. Open Applications > Utilities > Terminal.
  2. Run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  3. 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

Caretaker's Maintenance (free) flushes the DNS cache in one click, without Terminal.

Caretaker's Health page: memory, battery and disk.
Download free

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.