When DNSSEC validation fails, a domain does not degrade gracefully: every validating resolver returns SERVFAIL and users see a site that has simply vanished. The cause is almost never an attack. It is usually a signer that stopped re-signing, a DS record left at the registrar after a provider move, a key removed too early in a rollover, or a clock that has drifted. This guide is a working method for isolating which of those you have, using standard tools such as dig and delv, resolver logs and Extended DNS Error codes, and for deciding what to fix first. It is written for DNS administrators and network engineers who run authoritative zones, recursive resolvers or both. For signing design, algorithm choice and planned rollovers, see the DNSSEC Deployment Guide.
Key takeaways
- Prove it is DNSSEC first: repeat the failing query with the CD (checking disabled) bit set; if the answer comes back with CD and SERVFAIL without it, validation is the cause.
- Read the Extended DNS Error: RFC 8914 codes such as 7 Signature Expired, 9 DNSKEY Missing and 6 DNSSEC Bogus usually point straight at the broken link, but treat them as diagnostic hints only.
- Walk the chain from the top: check the DS at the parent, then the DNSKEY set, then the RRSIGs on the failing record, on every authoritative server, not just one.
- Remember caches: a DS record can stay in resolver caches for its full TTL after you remove it, so a hasty rollback can make an outage worse.
- Use negative trust anchors sparingly: RFC 7646 allows a temporary, manual, per-domain bypass on your own resolvers, with a lifetime that should not exceed a week, and only once you are sure it is a misconfiguration.
How validation fails
A validating resolver tries to build a chain of signed DNSKEY and DS records from a trust anchor (normally the root key) down to the record it was asked for. RFC 4035 Section 4.3 defines four outcomes:
| State | Meaning (RFC 4035) | What the client sees |
|---|---|---|
| Secure | A signed chain from the trust anchor to the RRset exists and validates | Answer with the AD bit set |
| Insecure | The resolver knows there is no chain, for example an unsigned delegation (no DS at the parent) | Answer without AD |
| Bogus | A chain should exist but cannot be built: signatures fail or required DNSSEC data is missing | SERVFAIL (RCODE 2) unless the query set CD |
| Indeterminate | The resolver cannot obtain the records it needs to decide | Usually SERVFAIL |
Insecure is a safe state; Bogus is an outage. The key operational fact sits in RFC 4035 Section 5.5: when no RRSIG validates, a recursive server must return SERVFAIL to the client, and returns the data only if the query had CD set. That is what makes the CD bit the single most useful troubleshooting switch.
| Symptom | Likely cause | First check |
|---|---|---|
| Whole domain SERVFAIL on validating resolvers, fine with CD set | Expired RRSIGs, or DS at parent matches no DNSKEY | RRSIG expiration on SOA and DNSKEY; DS versus DNSKEY key tags |
| Failure started right after a DNS provider or registrar change | Old DS left at the parent while the new provider signs with new keys | Compare DS at the parent with the new provider's DNSKEY set |
| Failure started hours or days after a key rollover | Old key removed before caches expired, or DS swapped too early | Rollover timeline against DS and DNSKEY TTLs |
| Only some users or some resolvers fail | One authoritative server serving a stale or unsigned copy; anycast node out of sync | Query each authoritative address directly and compare SOA serial and RRSIGs |
| Only some names fail, or only some record types | Partial signing, broken NSEC or NSEC3 denial proofs, wildcard edge cases | Query the failing name and type with +dnssec at each server; inspect NSEC records |
| Every signed domain fails on one resolver | Resolver clock wrong, stale root trust anchor, or a middlebox stripping DNSSEC records | Resolver time, trust anchor key tags, test with a known good signed domain |
| Failure persists after you "fixed" it | Cached bogus result or cached DS (EDE 13 Cached Error) | Flush the resolver cache for the name; wait out DS TTL on public resolvers |
Diagnosing SERVFAIL
SERVFAIL also comes from unreachable servers, lame delegations and timeouts. Separate them before touching keys.
- Confirm the symptom from a validating resolver:
dig example.com Aagainst your own validating resolver. Note the status and any EDE line in the OPT pseudosection. - Repeat with checking disabled:
dig +cd example.com A. In BIND's dig,+cd(synonym+cdflag) sets the CD bit, asking the server not to validate. If you now get NOERROR with data, the failure is validation. If you still get SERVFAIL, look at reachability and delegation instead. - Ask for the DNSSEC records:
dig +dnssec +multiline example.com SOA.+dnssec(synonym+do) sets the DO bit so RRSIG, NSEC and DS records are returned;+multilineprints RRSIG and DNSKEY fields with readable comments, including key tags. - Query the authoritative servers directly:
dig @ns1.example.net +dnssec +norecurse example.com SOAfor every NS, IPv4 and IPv6. Compare serials and RRSIG expiration times. A single stale secondary is enough to cause intermittent failures. - Let a validator explain itself:
delv example.com Auses the same resolver and validator code as named and reports why validation failed.+vtracelogs the validator's decisions and+rtracelogs each query it sends for DS and DNSKEY lookups. - Trace the delegation:
dig +trace example.comfollows referrals from the root with DNSSEC records enabled.
On the resolver side, turn on validation logging before you need it. In Unbound, val-log-level: 1 logs one line per failing query and level 2 adds the reason and the server that sent the bad data. Do not switch a production resolver to permissive mode (Unbound's val-permissive-mode) to rescue one domain: it removes protection for all of them.
Extended DNS Error codes
RFC 8914 (Standards Track, October 2020) lets a resolver attach an info code to a response. Resolvers that implement it return codes such as these alongside SERVFAIL:
| EDE | Name | Where to look |
|---|---|---|
| 1 | Unsupported DNSKEY Algorithm | Zone signed only with an algorithm the resolver does not support; treated as insecure rather than bogus |
| 2 | Unsupported DS Digest Type | DS set holds only digests the resolver does not support |
| 5 | DNSSEC Indeterminate | Resolver could not fetch DS or DNSKEY: check reachability of parent and child servers |
| 6 | DNSSEC Bogus | Generic failure: signatures do not verify against the keys; use delv to get the detail |
| 7 | Signature Expired | Signer or hidden primary stopped re-signing; secondaries serving an old copy |
| 8 | Signature Not Yet Valid | Inception time in the future: clock on signer or resolver |
| 9 | DNSKEY Missing | Parent has a DS but the child has no matching DNSKEY: registrar change or early KSK removal |
| 10 | RRSIGs Missing | An RRset that should be signed is not: partial signing or unsigned copy on one server |
| 12 | NSEC Missing | Negative answer without a covering NSEC or NSEC3 proof |
| 13 | Cached Error | SERVFAIL returned from cache: flush before retesting |
RFC 8914 is explicit that EDE does not change RCODE processing, that EXTRA-TEXT is for humans rather than parsers, and that EDE is unauthenticated, so it must be treated only as diagnostic information. The NSEC3 iteration code is covered in the DNSSEC Deployment Guide.
Expired or missing signatures
Every RRSIG carries an inception and an expiration time. RFC 4035 Section 5.3.1 requires the validator's current time to be greater than or equal to the inception and less than or equal to the expiration. Outside that window the signature is unusable, and if no other signature covers the RRset the answer is Bogus.
- Read the window: in
dig +dnssec +multilineoutput the RRSIG shows expiration then inception as YYYYMMDDHHMMSS timestamps in UTC. Check the SOA, the DNSKEY RRset and the failing record. If the DNSKEY RRset signature has expired, every name in the zone fails. - Find the dead signer: expired signatures almost always mean signing stopped: a hidden primary down, a signer that lost access to its keys or HSM, or a broken zone transfer leaving secondaries on an old copy.
- Check clocks for EDE 8: signatures that are not yet valid point to a signer clock running fast or a resolver clock running slow. Unbound allows skew of 10% of the signature lifetime, bounded by
val-sig-skew-min(default one hour) andval-sig-skew-max(default 24 hours), so short-lived signatures leave little room. Fix NTP before anything else. - Missing RRSIGs (EDE 10): usually one server serving an unsigned version of the zone, for example a secondary still transferring from the unsigned primary rather than the signer, or a record added outside the signing pipeline.
Once repaired, re-sign, bump the serial and confirm every secondary has it. Then alert on signature headroom well inside the re-signing interval.
Broken chain of trust and DS mismatches
The DS record at the parent is a hash of a key-signing key in the child zone. If no DNSKEY in the child matches any DS at the parent, the chain breaks and resolvers return EDE 9 DNSKEY Missing or 6 Bogus.
DS mismatch after a registrar or provider change
This is the most common self-inflicted DNSSEC outage. A zone moves to a new DNS provider, the new provider signs with its own fresh keys, and the old DS record stays at the registrar. Every validating resolver now sees a DS that points to a key that no longer exists.
- Compare key tags:
dig +norecurse @<parent server> example.com DSgives the key tag, algorithm and digest type.dig +multiline example.com DNSKEYshows each key's tag in the comments; the KSK has flags 257. The DS key tag and algorithm must match a published KSK (or CSK). - Verify the digest, not just the tag: key tags can collide. Generate the DS from the live DNSKEY (for example with BIND's
dnssec-dsfromkey) and compare the digest with what the parent publishes. - Fix in the right direction: if the new keys are correct, submit the new DS at the registrar and remove the old one. If you cannot get the right DS quickly, remove the DS to make the zone Insecure, accepting that recovery takes up to the DS TTL.
- Next time, migrate deliberately: either go insecure before the move and re-secure after, or use a multi-signer transition so the old and new keys overlap. The DNSSEC Deployment Guide covers both, plus CDS and CDNSKEY automation.
A DS change you did not make is a different problem: treat it as a possible registrar account takeover and follow the DNS Hijack Playbook. Registrar logins and DNS API tokens are credentials that control your whole chain of trust; see the Authoritative DNS and Registrar Account Security Guide.
Cached DS: why rollback hurts
Slack's account of its September 2021 DNSSEC rollout is the clearest public lesson. After publishing the DS for slack.com and seeing errors, the team removed the DS and then unsigned the zone. Resolvers still held the cached DS, so they began returning SERVFAIL: the .com zone tells resolvers to cache DS records for up to 24 hours, and zone owners cannot change that. Recovery needed resolver operators to flush caches. The rule: never unsign a zone while a DS for it may still be cached. Remove the DS, wait at least the parent's DS TTL, then stop signing.
Algorithm and key rollover problems
RFC 7583 states the goal of rollover timing as never letting any part of the zone go bogus. Failures happen when a step runs before caches have caught up. The three intervals to check against your change log are the publication interval (Ipub: how long before resolvers holding the old DNSKEY set have the new one), the retire interval (Iret: how long a retired key must stay published so data that depends on it leaves caches) and the registration delay (Dreg: how long a DS submitted to the parent takes to appear).
| What went wrong | Typical evidence | Remedy |
|---|---|---|
| ZSK removed while its RRSIGs are still cached | EDE 6 or 9 for some resolvers for up to the RRSIG TTL | Republish the old ZSK until Iret has passed |
| Old KSK removed before the old DS expired from caches (Double-KSK) | EDE 9 DNSKEY Missing; old DS key tag still seen | Republish the old KSK; wait the parent propagation delay plus the DS TTL |
| New DS published before the new KSK reached caches (Double-DS) | Failures after the DS change, before key switch | Keep both DS records; switch the KSK only after the DS change has propagated |
| Algorithm rollover with the new algorithm not signing every RRset | Bogus on some validators after the new DS is published | Sign all RRsets with both algorithms before publishing the new DS |
| Stale root trust anchor on a resolver or appliance | Every signed domain fails on that resolver only | Update the trust anchor; enable RFC 5011 tracking where supported |
When an automated signer (BIND dnssec-policy, Knot, PowerDNS or a managed provider) drives rollovers, check its key state output against the parent DS before blaming timing: most automated KSK rollovers stall waiting for a DS that nobody submitted.
Tools and checks
Tools are listed by function and are not recommendations.
| Tool | Use in troubleshooting |
|---|---|
| dig (BIND) | +cd, +dnssec, +multiline, +norecurse, +trace; reads EDE in the OPT pseudosection |
| delv (BIND) | Validates like named and explains failures; +vtrace, +rtrace, -a for an alternate trust anchor file |
| Resolver logs | Unbound val-log-level 1 or 2; BIND dnssec category logging |
| Chain visualisers | Web tools that graph the DS and DNSKEY chain from the root and flag errors per server |
| Negative trust anchor | RFC 7646 temporary per-domain bypass on your own resolvers (for example BIND rndc nta); not a fix for the zone |
When to use a negative trust anchor
If a domain your users depend on is broken by someone else's misconfiguration, RFC 7646 (Informational) allows a negative trust anchor on your own resolvers. Its guidance: use must not be automatic, the lifetime should not exceed a week, it must expire automatically, it should cover only the affected domain, and the resolver should keep checking whether the domain validates again. First rule out an attack, contact the domain owner and confirm the domain still belongs to them.
Detection and measurement
- Signature headroom: minimum time to RRSIG expiry, per zone and per authoritative server.
- DS to DNSKEY consistency: every DS at the parent matches a published KSK; alert on any change at the parent.
- Validation failure rate: SERVFAIL caused by validation on your resolvers, broken down by EDE code and domain.
- Serial agreement: all authoritative servers on the same SOA serial within your transfer target.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | SC-20 | Secure name/address resolution (authoritative): signing and serving valid signatures |
| NIST SP 800-53 Rev. 5 | SC-21 | Secure name/address resolution (recursive or caching resolver): validation |
| NIST SP 800-53 Rev. 5 | CM-3, SI-4 | Change control for DS and key changes; monitoring signature and DS health |
Common failure patterns
- Testing from one resolver: Slack found that one major public resolver cached a faulty negative answer while another did not reproduce it. Test across several validating resolvers.
- Unsigning while the DS is cached: the rollback that turns a partial outage into a total one.
- Disabling validation globally: permissive mode or validation off on corporate resolvers to fix one external domain, then left in place.
- Silent signer failure: no alert until signatures expire days later, at which point every name fails at once.
Practitioner checklist
- Confirm a validation failure with
dig +cdbefore changing anything. - Record the EDE code, then verify it against the actual DS, DNSKEY and RRSIG records.
- Query every authoritative server directly over IPv4 and IPv6 and compare serials and signatures.
- Match DS key tag, algorithm and digest at the parent to a published KSK.
- Check RRSIG inception and expiration on SOA, DNSKEY and the failing record, and check NTP on signer and resolver.
- Never unsign a zone until the DS has been removed and the parent DS TTL has passed.
- Use a negative trust anchor only for third-party domains, manually, for under a week, after ruling out an attack.
- Turn on resolver validation logging and alert on signature headroom and DS changes.
Standards and references
- IETF: RFC 4035 Protocol Modifications for the DNS Security Extensions
- IETF: RFC 8914 Extended DNS Errors
- IETF: RFC 7583 DNSSEC Key Rollover Timing Considerations
- IETF: RFC 7646 Definition and Use of DNSSEC Negative Trust Anchors
- ISC: BIND 9 Manual Pages (dig, delv)
- NLnet Labs: unbound.conf Reference
- Slack Engineering: What Happened During Slack's DNSSEC Rollout?
Related NHI Mgmt Group resources: DNSSEC Deployment Guide · DNS Security Guide · DNS Hijack Playbook · NIST SP 800-81 Rev. 3 Secure DNS Deployment Guide