Troubleshooting guide
DNS SERVFAIL: causes and how to fix it
SERVFAIL means a resolver tried and could not produce a valid answer. DNSSEC problems and unreachable nameservers cause most of them.
3 min read11 sectionsUpdated
On this page
# Confirm the status
dig example.com A | grep status
# Works with checking disabled? Then DNSSEC is the fault
dig +cd example.com A @8.8.8.8 | grep status
# Trace delegation
dig +trace example.com A | tail -15
# Ask each nameserver directly
for ns in $(dig +short NS example.com); do echo "$ns: $(dig @$ns example.com A +short +time=3 | head -1)"; done
# Is a DS record published at the parent?
dig +short DS example.comFixes
For DNSSEC, publish a DS record that matches the current key at your registrar or remove the DS entirely if you no longer sign the zone. Update the list of nameservers at the registrar so that it has only servers that are authoritative. Allow UDP and TCP port 53 through any firewall. Correct the glue records when nameservers are inside the same domain.
The classic migration mistake
Changing DNS providers on a signed zone is the single most common way to cause this. If the old DS record remains at the registrar while the new provider signs with different keys, or does not sign at all, validating resolvers such as 1.1.1.1 and 8.8.8.8 return SERVFAIL, while non-validating resolvers work fine. Some users therefore reach the site and others do not, with no obvious pattern. The safe order is to remove the DS record first, wait out its TTL, move providers, and then re-enable DNSSEC.
Catch it automatically
Query multiple public resolvers from your monitoring, because validating and non-validating ones differ. DNS monitoring and multi-region uptime checks both surface it.
What is the difference between SERVFAIL and NXDOMAIN?
NXDOMAIN says the name does not exist. SERVFAIL means the resolver could not get a valid answer.
Why do only some users fail?
Their resolvers validate DNSSEC, while others do not.
Is DNSSEC worth using?
It prevents spoofing but adds operational risk, so automate key management.
Check it now, free
- DNS lookup: A, AAAA, CNAME, MX, TXT, NS, SOA and CAA records.
Related reading
- Cloudflare error 1016 "Origin DNS error": how to fix it: Fix Cloudflare error 1016 Origin DNS error: CNAME records pointing to names that do not resolve, deleted origins and load balancer pools, with checks.
- 502 Bad Gateway: causes and how to fix it: What a 502 Bad Gateway means, the common causes behind Nginx, load balancers and CDNs, how to find yours and how to stop it happening again.
- 408 Request Timeout: causes and how to fix it: Understand 408 Request Timeout: slow client uploads, idle keep-alive connections and proxy settings, and how it differs from a 504 Gateway Timeout.
- ERR_HTTP2_PROTOCOL_ERROR: causes and how to fix it: Fix ERR_HTTP2_PROTOCOL_ERROR in Chrome: invalid response headers, crashed backends behind HTTP/2 proxies, buffer limits and antivirus interference.
- 503 Service Unavailable: causes and fixes: Why servers return 503 Service Unavailable, from overload and maintenance to no healthy backends, how to diagnose each cause and how to recover and prevent it.
- ENOTFOUND getaddrinfo: how to fix DNS errors in Node.js: Fix getaddrinfo ENOTFOUND and EAI_AGAIN in Node.js: wrong hostnames, a URL passed as host, container DNS and thread pool exhaustion, with test commands.
Watch your own site and services with VitalRix
Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.