Mac DNS Lookup Failed — Cannot Resolve Hostname Troubleshooting
Warningnetwork
Overview
Fix Mac DNS lookup failures causing 'server not found', 'DNS lookup failed', and inability to load websites while other network services work.
Key Details
- macOS uses mDNSResponder for DNS resolution, which can crash or become corrupted
- DNS issues on Mac can coexist with working IP-level connectivity (ping by IP works but names fail)
- VPN software frequently modifies DNS settings and may not restore them properly
- macOS stores DNS settings per-network interface, and wrong settings can persist across networks
- /etc/resolv.conf on Mac is auto-generated — manual edits are overwritten
Common Causes
- mDNSResponder service crashed or hung
- DNS servers configured in network settings are unreachable
- VPN modified DNS settings and did not restore them after disconnecting
- Wi-Fi network providing broken DNS server via DHCP
- macOS DNS cache corrupted with stale or incorrect entries
Steps
- 1Flush DNS cache: sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder
- 2Check DNS settings: System Settings > Wi-Fi > Details > DNS — ensure valid servers listed
- 3Set manual DNS: add 8.8.8.8 and 1.1.1.1 in DNS settings for your network
- 4Test resolution: nslookup google.com in Terminal — if it fails, DNS is the issue
- 5Restart mDNSResponder: sudo killall mDNSResponder
Tags
macdnslookup-failedmdnsrespondernetwork
More in Network
windows-651-pppoe-connection-failedWindows Error 651 — PPPoE Connection Failed
Warningwindows-691-authentication-failedWindows Error 691 — Authentication Failed
Warningwindows-720-ppp-connection-failedWindows Error 720 — PPP Connection Failed
Errorwindows-800-vpn-tunnel-failedWindows Error 800 — VPN Tunnel Failed
Warningwindows-network-error-619Windows VPN Error 619 — Connection Could Not Be Established
Warningwindows-network-error-868Windows VPN Error 868 — Remote Server Not Resolved
WarningFrequently Asked Questions
Your network connection works but DNS resolution is broken. DNS translates domain names to IPs. Set manual DNS servers to fix.