DNS resolution failed: NXDOMAIN
ID: networking/dns-resolution-failed
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
The DNS resolver returned NXDOMAIN, meaning the queried domain name does not exist in the DNS system. This can indicate a typo in the hostname, an expired domain, a missing DNS record, or a misconfigured DNS resolver.
genericWorkarounds
-
90% success Verify the hostname spelling and create or fix the DNS record
1. Double-check the hostname for typos 2. Verify domain registration: whois yourdomain.com 3. Check if the record exists: dig yourdomain.com A +short 4. If missing, add the record via your DNS provider's control panel 5. Wait for propagation (TTL-dependent, typically seconds to hours) 6. Verify: dig @8.8.8.8 yourdomain.com A
-
85% success Fix local DNS resolver configuration
1. Check current resolver: cat /etc/resolv.conf 2. Verify DNS connectivity: dig @8.8.8.8 google.com 3. If systemd-resolved is in use: resolvectl status 4. Set working nameservers in /etc/resolv.conf: nameserver 8.8.8.8 and nameserver 1.1.1.1 5. For systemd-resolved: edit /etc/systemd/resolved.conf and restart: systemctl restart systemd-resolved 6. Flush DNS cache: resolvectl flush-caches
Dead Ends
Common approaches that don't work:
-
Repeatedly retry the DNS query hoping for transient resolution
95% fail
NXDOMAIN is an authoritative negative response, not a transient failure. The domain definitively does not exist in DNS. Retrying wastes time and will continue returning the same negative result until the underlying issue (missing record, typo, expired domain) is fixed.
-
Switch to a random public DNS server to bypass the NXDOMAIN
70% fail
If the domain truly does not exist, all DNS servers will return NXDOMAIN because the authoritative nameserver says so. Switching DNS servers only helps if the current resolver is misconfigured or caching stale data, which is a different issue from a genuine NXDOMAIN.