DeviceHowTo
macOS8 min

How to Fix DNS Errors on macOS

Resolve DNS server not responding and website-not-loading errors.

Last verified: February 21, 2026

macOS maintains its own DNS client cache through the mDNSResponder service, separate from any browser-level cache, which means flushing requires a Terminal command rather than a simple settings toggle. The flush command is version-specific: modern macOS versions use sudo dscacheutil -flushcache followed by sudo killall -HUP mDNSResponder plus a browser restart to ensure a completely clean state. Setting custom DNS under System Settings > Network > Wi-Fi > Details > DNS is persistent and survives restarts, making it a reliable fix for networks that repeatedly serve faulty DNS responses.

Quick Steps

Follow in order for the fastest result.

  1. 1Open Terminal and run: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder — then restart your browser.
  2. 2Set a reliable public DNS manually: Primary 8.8.8.8, Secondary 8.8.4.4, found in your network adapter or Wi-Fi settings.
  3. 3Restart the browser and test loading sites that previously failed.

Still Not Working?

Try these if the steps above didn't help.

Verify the Fix

Confirm everything is fully working before closing this guide.

Frequently Asked Questions

Does macOS have a built-in way to fix dns errors?
Yes. macOS includes a native option to fix dns errors without installing third-party software. Follow the Quick Steps above for the exact location in the settings menu.
How long does it take to fix dns errors on macOS?
Most users complete this in about 8 min. Complex cases that require troubleshooting or a restart may take a few extra minutes.
Is it safe to fix dns errors on macOS?
Yes — this is a standard macOS operation. Follow the steps exactly as written, particularly any warnings shown in red or amber banners at the top of this guide.
What should I do if fix dns errors doesn't work on macOS?
Follow the Still Not Working section above for targeted fallback steps. As a final resort, install any pending OS updates and restart the device before trying again — most software issues resolve after an update.

Same task, different device

Related guides for macOS