DNSVerdict

DNSSEC SERVFAIL after a DNS move: fix a bogus domain

Published · Updated

If a domain returns SERVFAIL on validating resolvers (1.1.1.1, 8.8.8.8, Quad9) but resolves on others, the likely cause is a DS record at the registrar that no longer matches the keys at your DNS host. You moved DNS or turned off signing and left the old DS behind. Remove the DS at the registrar, then wait for it to leave resolver caches. Confirm the diagnosis with the DNSSEC check.

DNSVerdict’s DNSSEC Check reads the DS, DNSKEY and the AD flag from Cloudflare and Google in your browser, and reports Inconclusive when the name servers fail even with checking disabled.

Why it fails for some people only

The parent zone publishes a DS record that says “this child zone is signed, and these are its keys”. A validating resolver that sees a DS must find a matching DNSKEY and valid signatures in the child. If it cannot, the data is Bogus and, per RFC 4035 §5.5, the resolver must return RCODE 2 (SERVFAIL) to the client. A resolver that does not validate never checks, so it returns the records normally.

That explains the pattern: your office ISP resolver works, a colleague on 1.1.1.1 gets “server not found”, and a mobile network behaves differently again. See DNS propagation explained for why this is not propagation, even though it looks like it.

The usual triggers:

Diagnose with the CD flag

The CD (Checking Disabled) bit asks a resolver to return the data even if validation fails (RFC 4035 §3.2.2). Run the same query twice against a validating resolver:

dig @1.1.1.1 example.com A          ; SERVFAIL
dig @1.1.1.1 example.com A +cd      ; NOERROR with the answer

SERVFAIL without CD and a normal answer with CD is the signature of a bogus chain. The DNS data is fine; the validation is what fails. Over DoH, Cloudflare documents cd as the parameter that disables validation:

curl -s -H 'accept: application/dns-json' \
  'https://cloudflare-dns.com/dns-query?name=example.com&type=A&cd=1'

If the query fails even with CD, the problem is not DNSSEC: the name servers may be down or lame; use the NS lookup to see which servers the parent delegates to and whether each one answers.

Then compare the two sides. Ask the DNS lookup for DS and for DNSKEY:

ObservationMeaning
DS exists, no DNSKEY in the zoneZone is unsigned or the host dropped signing: stale DS
DS exists, DNSKEY exists, key tag or digest differsKeys changed at the host: DS is out of date
DS and DNSKEY match, no RRSIG or RRSIG expiredThe signer stopped working: fix at the DNS host
No DSNot a DNSSEC problem

Resolvers that support Extended DNS Errors (RFC 8914) may add a reason to the SERVFAIL, for example 6 “DNSSEC Bogus”, 7 “Signature Expired”, 9 “DNSKEY Missing” or 10 “RRSIGs Missing”. Those four map directly onto the rows above when they are present.

The fix, in order

The rule from RFC 6781 is that the parent’s DS comes out first and the child’s keys go second. §4.2.1.2 describes removing the DS so the child becomes Insecure, and only after the DS has expired from distant caches are the keys and signatures removed. §4.1.4 says the same about algorithm changes: “the DS for the algorithm should be removed from the parent zone first, followed by the DNSKEY”.

If you are already down:

  1. Log in to the registrar and delete the DS record for the domain. Some registrars label it “DNSSEC” or “DS data”.
  2. Wait for the old DS to expire from resolver caches. Until then, resolvers that cached it keep returning SERVFAIL; ones with an empty cache recover immediately.
  3. Re-test with and without +cd. When both work, the domain is Insecure, which is a normal, working state.
  4. Later, if you want DNSSEC again, enable signing at the new host, check that it validates, and only then publish the new DS at the registrar.

If you are planning a move:

  1. Remove the DS at the registrar.
  2. Wait for the DS TTL to pass. Read it from the parent with a DS query; it is set in the parent zone, so you usually cannot shorten it.
  3. Change the name servers (see TTL before migration for lowering the other TTLs first).
  4. Check the new host answers, enable signing there, and publish the new DS.

RFC 6781 §4.3.5.2 describes this “go Insecure” path for a change between operators who do not cooperate: ask the registry to remove the DS, make the change, and once it has propagated, ask for the new DS. It gives no fixed duration for the wait.

The two waits

Two separate caches are involved, and each has its own clock.

The two overlap but do not add up neatly, and you cannot see other people’s cache state. Treat the longer of the two as a minimum and plan around the worst case. This is the main reason a DNSSEC move needs more notice than an unsigned one.

Automating removal

RFC 8078 §4 defines a way for the child zone to ask for DS removal: publish a CDS record 0 0 0 0 or a CDNSKEY record 0 3 0 0, signed like other CDS/CDNSKEY records. The parent then removes the DS set if it accepts the request. Acceptance rules are left to each parent, and RFC 7344 describes the polling model. Whether your registry or registrar polls is a question for their documentation; do not rely on it in an emergency, since the manual DS deletion works at once.

FAQ

Why does my site work on one network and fail on another? Validating resolvers such as 1.1.1.1, 8.8.8.8 and Quad9 check signatures and answer SERVFAIL when the chain fails (RFC 4035 §5.5). A resolver that does not validate does not check signatures and returns the data. So an ISP resolver may work while public resolvers fail, which makes the fault look random.

How long until the fix takes effect? Until the old DS expires from resolver caches. That is the TTL of the DS record in the parent zone, which the registry sets and you cannot usually shorten. Query the DS record to read its TTL. If you also change name servers, the NS delegation TTL is a second, separate wait. RFC 6781 gives no fixed duration for this step.

Should I disable signing at my DNS host first? No. Remove the DS record at the registrar first, wait for it to expire from caches, then stop signing. RFC 6781 §4.2.1.2 removes keys and signatures only after the DS has expired from distant caches. Reversed, the parent still says the zone is signed while the child has no keys, and validating resolvers return SERVFAIL.

Can the registrar remove the DS automatically? Only if the registry and registrar support it. A child zone can publish CDS 0 0 0 0 and CDNSKEY 0 3 0 0 to request DS removal (RFC 8078 §4), and the parent decides whether to act; acceptance rules are left to each parent. Check your registrar’s documentation, and do not assume it polls.

Sources

Related: DNSSEC explained, RDAP vs WHOIS, domain status codes, what happens when a domain expires.

Tools used

DNSSEC CheckDNS LookupNS Lookup