This guide is maintained by Ops Error Atlas from a backend engineering perspective. It favors evidence, command output, and failure-layer separation over broad definitions or blind configuration changes.
How Ops Error Atlas reviews guidesSERVFAIL means a DNS resolver answered the query but failed to complete resolution successfully. This is different from a resolver timeout and different from NXDOMAIN. The resolver is reachable, but it could not produce a valid answer.
The useful question is:
Which resolver returned SERVFAIL, and did authoritative DNS, delegation, DNSSEC, or resolver policy cause it?
Do not treat SERVFAIL as “domain does not exist.” A domain can exist and still return SERVFAIL.
Separate SERVFAIL from other DNS failures
| DNS result | Meaning |
|---|---|
| timeout | resolver did not return a usable response |
NXDOMAIN | resolver says the name does not exist in that DNS view |
SERVFAIL | resolver failed while trying to answer |
| wrong IP | resolver answered, but data or view is not expected |
REFUSED | resolver policy rejected the query |
SERVFAIL is useful because it proves the resolver path is at least partially reachable.
Query multiple resolvers
Test the resolver used by the failing process:
dig @<resolver-ip> example.com A +time=2 +tries=1
Then compare with another resolver only as evidence:
dig @1.1.1.1 example.com A +time=2 +tries=1
dig @8.8.8.8 example.com A +time=2 +tries=1
Interpretation:
| Result | Branch |
|---|---|
| internal resolver SERVFAIL, public resolver answers | internal resolver recursion, policy, private DNS, or DNSSEC path |
| all resolvers SERVFAIL | authoritative zone, delegation, or DNSSEC problem |
| public resolver NXDOMAIN, internal resolver answers | private/split DNS expected |
| only one resolver SERVFAIL | resolver-specific cache, validation, or upstream issue |
Do not replace an internal resolver with public DNS if the name is private.
Trace authoritative path
Use:
dig example.com A +trace
dig NS example.com
dig SOA example.com
Look for:
- broken delegation;
- unreachable authoritative name servers;
- inconsistent answers between authoritative servers;
- missing glue records;
- lame delegation;
- expired zone data;
- DNSSEC validation problems.
For private zones, public +trace may not represent the internal DNS view.
DNSSEC branch
DNSSEC validation failures often appear as SERVFAIL from validating resolvers.
Strong signals:
- non-validating resolver answers, validating resolver returns
SERVFAIL; - failures start after DS/DNSKEY/zone signing changes;
- only signed zones fail;
- domain testing tools report DNSSEC errors.
Checks:
dig example.com A +dnssec
dig example.com DNSKEY
dig example.com DS
Fix path:
- repair DS records at the parent zone;
- publish correct DNSKEY records;
- fix expired signatures;
- align registrar and DNS provider DNSSEC settings;
- wait for caches only after the chain is correct.
Do not disable validation globally to hide one broken zone unless you understand the security tradeoff.
Authoritative server branch
Strong signals:
- all recursive resolvers return
SERVFAIL; - authoritative servers time out or disagree;
- one nameserver has stale or broken zone data;
- delegation points to old nameservers;
- recent DNS provider migration.
Checks:
dig @<authoritative-ns> example.com A
dig @<authoritative-ns> example.com SOA
Fix path:
- repair authoritative zone data;
- remove stale nameservers from delegation;
- fix glue records;
- verify all authoritative servers serve the same zone serial and records.
Resolver overload or upstream failure
Strong signals:
- many unrelated domains return
SERVFAIL; - resolver logs show upstream timeout or forwarder failure;
- CoreDNS logs contain
SERVFAILor upstream errors; - resolver CPU, memory, or network is saturated;
- failures are intermittent.
Checks:
journalctl -u systemd-resolved --since -30m
kubectl -n kube-system logs deploy/coredns --tail=100
For BIND, Unbound, CoreDNS, or cloud resolvers, inspect provider-specific logs and metrics.
Fix path:
- restore upstream forwarders;
- reduce retry storms;
- increase resolver capacity;
- fix blocked egress from resolver to upstream DNS;
- verify with the failing resolver, not only public DNS.
Kubernetes and private DNS branch
Inside clusters, SERVFAIL can come from CoreDNS plugin behavior, upstream resolver errors, or private zone forwarding.
Checks:
kubectl exec -it <pod> -- cat /etc/resolv.conf
kubectl exec -it <pod> -- dig <name>
kubectl -n kube-system logs deploy/coredns --tail=100
kubectl -n kube-system get configmap coredns -o yaml
Strong suspects:
- CoreDNS forwarding to unreachable upstreams;
- private zone forwarding misconfigured;
stubDomainsor Corefile changes;- NetworkPolicy blocks DNS egress from CoreDNS;
- split DNS view mismatch.
What not to do
- Do not call
SERVFAILthe same asNXDOMAIN. - Do not test only one resolver.
- Do not switch to public DNS for private names.
- Do not ignore DNSSEC after registrar or DNS provider changes.
- Do not debug application code before proving DNS answer behavior.
Decision tree
DNS SERVFAIL
|
+-- which resolver returned it?
| +-- query failing resolver directly
|
+-- all resolvers SERVFAIL?
| +-- inspect authoritative DNS, delegation, DNSSEC
|
+-- only validating resolvers fail?
| +-- inspect DNSSEC chain
|
+-- only internal resolver fails?
| +-- inspect resolver forwarding, private DNS, CoreDNS, policy
|
+-- many domains fail?
+-- inspect resolver overload or upstream outage
Minimal incident note
failing name:
record type:
failing resolver:
dig output:
comparison resolver output:
authoritative NS:
DNSSEC status:
private/public zone:
resolver logs:
confirmed branch:
fix:
verification:
The incident is solved when the intended resolver returns the expected answer or a correct negative answer, and SERVFAIL is no longer present for that DNS view.
References
- Linux
resolv.conf(5)manual page - BIND 9 manual pages for
dig - Kubernetes DNS for Services and Pods
- Cloudflare DNSSEC documentation
Related errors
Move laterally when the first symptom points to adjacent network failures.
What does "DNS server unreachable" mean?
A practical DNS server unreachable guide that separates resolver configuration, routing, firewall, UDP/TCP 53, container DNS, and upstream resolver outages.
Read guideHow to debug "temporary failure in name resolution"
A practical Linux DNS troubleshooting guide for temporary failure in name resolution, covering resolver config, systemd-resolved, search domains, containers, Kubernetes DNS, and resolver timeouts.
Read guideWhat does "no route to host" mean?
A practical no route to host guide that separates missing routes, gateway failures, firewall rejects, container networks, Kubernetes policies, and unreachable subnets.
Read guideHow to debug "connect timed out" errors
A practical connect timed out guide that separates DNS, routing, firewall drops, TCP SYN loss, listener backlog pressure, load balancers, and wrong targets.
Read guideKeep one representative log line, the failing source and destination, the command output you used, and the verification command after the change. This makes the result reproducible and helps separate temporary recovery from a proven fix.
Browse related error guides