Skip to content

Flush the DNS cache — via Marc Abramowitz

Commandlow riskNeeds adminmacOS 14 Sonoma and later

If a website moved to a new server, or you changed DNS settings and some sites still won't load, your Mac may be holding on to old address lookups. Flushing the DNS cache makes it look them up fresh. It's a troubleshooting step, not a speed boost.

Takes effect right away

The easy way

  1. Run the command and enter your password. It prints nothing when it works.
  2. Then reload the page that wasn't working.

Command

Run in Terminal (Applications › Utilities). It uses sudo, so macOS asks for your password.

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Nothing to undo: the cache simply refills as you browse. Apple doesn't document which of the two parts each macOS version needs, so running both is the usual advice.

Sources

Source reviewed
2026-11-02
Link checked
2026-11-02
Tested hands-on
Not by Oddbyte.Me

Oddbyte.Me hasn't tried this on every macOS version, so keep the undo handy.

dnsflush dnsdns cachewebsite not loadingmDNSResponder

More in Networking

Run Apple's built-in internet speed test — via SS64

Commandlow risk

macOS has its own speed test in Terminal. Besides download and upload speed, it measures 'responsiveness' (round trips per minute while the line is busy), which explains why video calls stutter on a connection that looks fast.