Skip to content

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

Key points

  • SERVFAIL is not NXDOMAIN: the name may be fine.
  • dig +cd reveals DNSSEC faults.
  • All nameservers must answer consistently.
  • Failures can vary by resolver.

What it means

The status code signals that the resolver failed to complete the lookup. It could not reach an authoritative server, received something unusable, or could not validate a DNSSEC signature. Because the failure happens during resolution, your web server logs show nothing.

Common causes

  • DNSSEC mismatch: a DS record that does not match current keys, frequently after moving DNS provider.
  • Expired DNSSEC signatures.
  • Lame delegation, where a listed nameserver does not serve the zone.
  • Nameservers unreachable, or blocked over UDP/TCP 53.
  • Glue records that are wrong.

Diagnose it

Compare validating and non-validating answers, and test each nameserver.

bash
# 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.com

Fixes

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.

Frequently asked questions

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.

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.