DNS SERVFAIL Explained: Causes, Diagnosis, and Recovery
A DNS lookup normally returns an address, a useful record, or a clear answer that the requested name does not exist. A SERVFAIL response is different: it means the resolver could not complete the lookup successfully. The domain may exist and its records may be correct, but something prevented a trustworthy answer from reaching the client.
Because SERVFAIL is deliberately broad, diagnosing it requires checking the complete resolution path rather than changing records at random.
SERVFAIL Is Not the Same as NXDOMAIN
NXDOMAIN is an authoritative negative answer stating that a name does not exist. SERVFAIL reports a processing failure. A recursive resolver might have timed out while contacting authoritative servers, rejected invalid DNSSEC data, received malformed replies, or found an unusable delegation.
This distinction matters during troubleshooting. If a browser reports a name-resolution error, confirm the exact DNS response with a tool such as dig. Do not assume the domain or record is missing simply because the website is unreachable.
Check the Most Common Causes
Start with authoritative availability. Every listed nameserver should answer reliably over both UDP and TCP on port 53. Firewalls, routing problems, overload, or an expired secondary zone can make the authority unavailable. A resilient secondary DNS design reduces the risk that one server failure interrupts resolution.
Next, inspect the delegation. Parent-zone NS and glue records must agree with the authoritative setup. Then examine DNSSEC. An incorrect DS record, missing DNSKEY, expired signature, or inconsistent signed data can cause validating resolvers to return SERVFAIL even when non-validating tests appear normal. Our DNSSEC overview explains how that chain of trust fits together.
The ClouDNS guide to SERVFAIL also summarizes common causes, including connectivity, configuration, DNSSEC, and server-capacity problems.
Compare Recursive and Authoritative Answers
Query more than one public or local recursive resolver. If only one fails, its cache, policy, or route may be responsible. If several fail, query each authoritative nameserver directly. For example, use dig example.com A @resolver-address, then dig example.com A @authoritative-server +dnssec.
Compare response codes, flags, timing, returned records, and whether TCP succeeds. Test the same record type against every authority. Different serials or answers often reveal an incomplete zone transfer or an update that reached only part of the DNS platform. The values in the SOA record help explain how secondary servers refresh and when stale zone data expires.
Look for Extended DNS Error Details
Modern resolvers may include an Extended DNS Error code alongside SERVFAIL. This extra information can identify a stale answer, unreachable authority, DNSSEC validation failure, or another specific condition. Capture it before clearing caches or changing the zone, because it can shorten the investigation considerably.
Recover Methodically and Verify
Fix the demonstrated cause: restore nameserver reachability, correct the delegation, synchronize the zone, or repair the DNSSEC chain. Then repeat recursive and direct authoritative tests from multiple networks. Allow time for cached failures to expire, and monitor DNS resolution separately from ordinary HTTP uptime.
For the standardized list of diagnostic codes and their meanings, consult RFC 8914: Extended DNS Errors. SERVFAIL is only the starting signal; disciplined comparisons reveal where the lookup actually broke.