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.
- 1Open Terminal and run: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder — then restart your browser.
- 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.
- 3Restart the browser and test loading sites that previously failed.
Still Not Working?
Try these if the steps above didn't help.
- Disable any active VPN — VPNs can intercept and break DNS resolution.
- Restart the router to flush its own DNS cache.
- Test another browser to rule out a browser-specific DNS cache problem.
Verify the Fix
Confirm everything is fully working before closing this guide.
- Load 3–4 different websites, including ones that were previously unreachable.
- Confirm page load times are back to normal.
Frequently Asked Questions
Does macOS have a built-in way to fix dns errors?
How long does it take to fix dns errors on macOS?
Is it safe to fix dns errors on macOS?
What should I do if fix dns errors doesn't work on macOS?
Same task, different device
Related guides for macOS
Fix Wi-Fi Not Working
Restore internet access with fast, high-success diagnostic steps.
Fix Bluetooth Not Working
Resolve pairing failures, connection drops, and missing Bluetooth toggle.
Take a Screenshot
Capture your full screen or a selected region using built-in shortcuts.
Record Your Screen
Start a native screen recording without installing third-party software.