Skip to Content
Sindre Sorhus
Back to Supercharge

Updated

How to Flush the DNS Cache on Mac

By Sindre Sorhus, who makes the Supercharge app

With Supercharge

  1. Open the settings of Supercharge, and click “Tools”.
  2. In the “Maintenance” section, click “Flush DNS Cache”.
  3. Enter your administrator password.

Flushing the DNS cache can fix connection problems after a DNS change, like a website that does not load after it moved to a new server, or a new DNS server that seems to have no effect.

Get Supercharge

Elevate your Mac experience

$20, one-time purchase, plus tax where applicable

Requires
macOS 27 or later
Updated
November 2026
Gumroad rating
5.0/5 (293 ratings)

More about Supercharge

Without an app

Open the Terminal app, and run this command:

Terminal
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Enter your administrator password, and press Return. Terminal shows no characters while you type the password, and there is no output when it works. If you are comfortable with Terminal, this is just as good as the button.

To do it without Terminal, add the “Flush DNS cache” shortcut to the Shortcuts app. Then choose “Shortcuts › Settings”, click “Advanced”, and turn on “Allow Running Scripts”. The shortcut tells the DNS service of macOS to clear its cache (killall -HUP mDNSResponder), and asks for your administrator password.