DNSSEC SERVFAIL: broken signatures or broken DNS? A test
DNSSEC breaks in an unusual way. A validating resolver doesn’t hand back a wrong answer, it hands back SERVFAIL, and your domain vanishes for everyone behind that resolver while it keeps working for people whose resolver doesn’t validate. So “works for me” is a bad test. Here’s a two-query check that tells a DNSSEC failure from an ordinary DNS outage. I ran it against a domain that’s deliberately broken for exactly this purpose.
The two flags that matter
A DNS response carries two bits you can use. AD (Authenticated Data) means the resolver validated the answer from the root down, and you only ever see it from a validating resolver. CD (Checking Disabled) is something you set yourself to tell the resolver to skip validation and give you whatever the nameservers said.
The test is to ask for the name normally, then again with CD set, and compare:
| Normal query | CD=1 query | Meaning |
|---|---|---|
| NOERROR, AD set | NOERROR | Signed and valid |
| NOERROR, no AD, no DS at the parent | NOERROR | Not signed (normal for many domains) |
| SERVFAIL | NOERROR | DNSSEC is broken: the data is there, validation fails |
| SERVFAIL | SERVFAIL | Ordinary DNS failure, DNSSEC isn’t the cause |
Commands, and what I actually ran
On a machine with dig, the equivalents are these. I did not run them, because the sandbox I tested in has no dig:
dig +dnssec example.com A # look for the "ad" flag in the header
dig +cd example.com A # same query with validation skipped
dig DS example.com # is a DS record published at the parent?
What I ran instead is the same test over DNS-over-HTTPS, which works anywhere HTTPS does. Cloudflare’s resolver returns the flags as JSON:
curl -s -H 'accept: application/dns-json' \
'https://cloudflare-dns.com/dns-query?name=dnssec-failed.org&type=A&cd=0'
curl -s -H 'accept: application/dns-json' \
'https://cloudflare-dns.com/dns-query?name=dnssec-failed.org&type=A&cd=1'
Real output for the broken test domain dnssec-failed.org, run on 2026-12-02 and abbreviated:
{"Status":2, "AD":false, "CD":false, ... "Comment":["EDE(9): DNSKEY Missing no SEP matching the DS found for dnssec-failed.org."]}
{"Status":0, "AD":false, "CD":true, ... "Answer":[{"name":"dnssec-failed.org","type":1,"TTL":300,"data":"96.99.227.255"}], ...}
Status 2 is SERVFAIL. The same name resolves fine once validation is skipped, so the data exists and the chain of trust is what’s broken. The comment is an Extended DNS Error (RFC 8914). Code 9 is “DNSKEY Missing”. Others you’ll run into: 6 (DNSSEC Bogus), 7 (Signature Expired), 8 (Signature Not Yet Valid) and 10 (RRSIGs Missing).
A probe that does the classifying
Reading raw JSON by hand gets old, so probe.py in the evidence folder runs both queries, fetches the DS record at the parent and prints a verdict. The classification function has 6 unit tests and they pass. Here’s the output for a few names:
dnssec-failed.org [cloudflare]
validating : SERVFAIL AD=False answers=[]
CD=1 : NOERROR AD=False answers=['96.99.227.255']
DS at parent: 1 record(s) e.g. 42069 13 2 62726f6b656e20636861696e206f662074727...
verdict : DNSSEC-BROKEN - SERVFAIL with validation on, but the records resolve when validation is skipped (CD=1). ...
cloudflare.com
validating : NOERROR AD=True ...
verdict : DNSSEC-VALID - The resolver validated the whole chain of trust (AD flag set).
github.com
validating : NOERROR AD=False ...
DS at parent: 0 record(s)
verdict : UNSIGNED - Resolves, no AD flag and no DS record at the parent: ...
nxtest-9f3k2.iana.org
validating : NXDOMAIN AD=True ...
verdict : NXDOMAIN - The name does not exist (this answer is itself DNSSEC-validated when AD=true).
example.com validated too, and www.dnssec-failed.org failed the same way as its parent. I also sent the broken name to Google Public DNS and got the same SERVFAIL and NOERROR split, with the message “DNSSEC validation failure”. Two independent validating resolvers agreeing is a better signal than one.
Two details caught my eye. With CD=1 the AD flag came back false even for cloudflare.com, which validates fine on the normal query. That makes sense, since you told the resolver not to check, but it means you must never read AD off the CD query. And the NXDOMAIN case: a name that doesn’t exist can still come back with AD set, because DNSSEC also signs the proof that a name is absent.
The state of github.com and the others is a point-in-time snapshot and may change.
How this domain is broken
The test domain’s DS record is 42069 13 2 62726f6b.... The digest is fake on purpose. The hex decodes to the ASCII text “broken chain of trust send help!”, so the parent publishes a DS that matches no key in the zone. That’s the whole trick.
Why real domains break
These are the usual patterns. The list is general knowledge, not something I reproduced.
The classic one is moving DNS hosting and leaving the old DS record at the registrar. The new nameservers sign with different keys, or aren’t signed at all, so the DS no longer matches. Other causes: an RRSIG expired because a signing job stopped (EDE code 7), a key rollover that went wrong, such as the new key published at the parent before the zone serves it, or a DS added before the zone was signed.
Safe order of operations
This is standard guidance. Check your DNS provider’s documentation, because I didn’t execute any of it on a domain.
To enable, sign the zone first, confirm the DNSKEY is being served, and only then add the DS record at the registrar. To disable or switch providers, remove the DS at the registrar first, wait for its TTL to run out (often 24 to 48 hours), and only after that stop signing or change nameservers. Whenever you touch either side, run the two-query test from at least two validating resolvers before you close the ticket.
Check many domains at once
If you look after a list of domains, my Apify Actor (linked below) reads DNS and DNSSEC status along with SPF, DKIM, DMARC, MTA-STS, TLS and security headers in one run, and gives you a fix list per domain. That’s a convenience for a portfolio. For debugging one failing name, the manual test above is what you want. The SPF and DMARC checker and the security headers checker cover the neighboring checks.
Reproduce it
run.sh in the evidence folder regenerates every output on this page. It needs only Python and an internet connection that allows HTTPS.
Related
- SPF “too many DNS lookups” and DMARC rollout: the email side of DNS.
- Another tested guide on this site: Bicep optional parameters and conditional resources.