← All DNS guides

How to set up OpenDNS or Google DNS on macOS

On macOS you set DNS per network service (Wi‑Fi or Ethernet) in System Settings.

Why change DNS on Mac?

When Safari or Chrome cannot resolve a domain that works on your iPhone’s cellular data, Mac Wi‑Fi DNS is the usual suspect.

Recommended public DNS servers

  • OpenDNS (Cisco): 208.67.222.222 / 208.67.220.220
  • Google Public DNS: 8.8.8.8 / 8.8.4.4
  • Cloudflare DNS: 1.1.1.1 / 1.0.0.1

Configure DNS on macOS (Ventura and later)

  1. Open System Settings → Network.
  2. Select Wi‑Fi or Ethernet, then click Details…
  3. Open the DNS tab.
  4. Click + under DNS Servers and add 208.67.222.222 and 208.67.220.220 (OpenDNS) or 8.8.8.8 and 8.8.4.4 (Google).
  5. Remove or ignore grey DHCP entries once your custom servers are listed.
  6. Click OK, then Apply.

Flush DNS cache on macOS

Clear the system DNS cache after changing servers.

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  1. Open Terminal (Applications → Utilities).
  2. Run: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  3. Enter your Mac password when prompted (nothing will echo as you type).
  4. Reload the site in your browser.

Verify it worked

If it still fails, forget the Wi‑Fi network and reconnect, or set DNS on the router for every Apple device at once.

Related DNS guides