What 'DNSSEC validation failed' means
A validating resolver checked the signatures or the DS-to-DNSKEY link for an answer, the check did not pass, and the resolver returned SERVFAIL instead of the answer. A resolver is the server that looks up DNS answers on behalf of your device. When a DNSSEC-aware recursive server finds that hash values do not match, it replies to the client with SERVFAIL. The same happens when none of the signatures in a response can be validated. The response should then be considered bad, and a name server handling a recursive query must return RCODE 2 (SERVFAIL).
The cause may be local, may be on the domain, or may be a forged response. A bogus result may indicate an attack, but it may also indicate a configuration error or data corruption. The next two sections show how to tell these apart. The quickest test is a dig +cd query.
The chain that the resolver checks has four links:
root trust anchor -> DS at the TLD -> DNSKEY of the domain -> RRSIG over the domain's records
- Trust anchor: a public key, or its DS hash, that the resolver is configured with. It is the starting point for obtaining authentication keys.
- DNSKEY: the public key a zone publishes. The zone signs its authoritative record sets (RRsets) with the matching private key, and a resolver uses the DNSKEY to validate those signatures.
- RRSIG: the signature record for an RRset. It gives the signature's validity interval. Its algorithm, signer's name and key tag identify the DNSKEY that verifies it.
- DS: a record in the parent zone that holds a hash of a child DNSKEY. The DNSKEY is authenticated by matching that hash.
Verification runs up the chain. The domain's key signing key is checked at the TLD, then the TLD's key signing key at the root. Root keys are distributed to DNS clients to complete the chain. A zone is the part of the DNS namespace that one set of authoritative nameservers answers for. A break at any link produces the same SERVFAIL.
Confirm DNSSEC is the cause with dig +cd
SERVFAIL does not mean the nameserver is down. The +cd test separates a dead server from a DNSSEC failure.
Run the two queries and compare
dig example.com A +dnssec
dig example.com A +dnssec +cd
The first query asks for DNSSEC data and lets the resolver validate. The second sets the Checking Disabled (CD) bit. If the CD bit is clear and required validation fails, no response is sent. If CD is set, a response is sent whether or not validation succeeded.
Compare the status: field in the header of each answer:
- The first query shows
status: SERVFAILand the second showsstatus: NOERRORwith a proper answer. This points to a DNSSEC misconfiguration. It often happens when authoritative nameservers are changed without updating the DS records. A forged response can produce the same pattern. - Both queries show SERVFAIL. DNSSEC is probably not the cause. Look at the nameservers themselves with the NS lookup.
Data returned with +cd has not necessarily been validated. It shows that the nameservers answer, not that the answer is trustworthy.
How to read the ad flag and SERVFAIL
Look for ad in the flags: line. A response is DNSSEC authenticated if the ad flag appears in the response header. A set AD bit means the response was validated and is therefore authentic. An unset AD bit is ambiguous. It can mean validation was not attempted, or that validation failed. A missing ad flag alone proves nothing.
A stub resolver is the small resolver built into your operating system. A validating stub must set the DO bit, otherwise it does not receive the DNSSEC records it needs. A recursive server must also signal DNSSEC awareness (the DO bit) when it queries authoritative servers, so that they include DNSSEC data in their responses. dig +dnssec sets the DO bit for you.
Check the chain from the outside
Your own resolver may be the problem, so test from a vantage point you do not control. Check the DNSSEC chain of trust for your domain to see the DS, DNSKEY and signature links independently of your resolver.
Decide whether the cause is local or on the domain
Use the table below. It is keyed to what you can observe, not to vendor error strings. It does not try to explain every error message a resolver can print.
Triage table: what you see, what it suggests, where to go next
| Observation | Likely side | Next step |
|---|---|---|
Normal query returns SERVFAIL and the +cd query returns a proper answer |
Misconfigured domain, often a DS not updated after a nameserver change. A forged response is also possible. | Run the outside chain check, then go to the domain-side fixes. |
| The outside checker fails, or other validating resolvers fail too | Domain side | Fix the DS or signatures at the domain. |
| Only one resolver or one machine fails | Local: clock, trust anchor, algorithm support or upstream interference. | Go to the local fixes. |
The answer comes back without the ad flag |
Unknown. Validation may not have been attempted. | Treat as no evidence. Test against a resolver you know validates. |
| The error persists after retries | Administrative cause, such as failure to re-sign the zone or clock skew. | Fix the signer or the clock. Retrying does not help. |
If a response lacks DNSSEC records altogether, do not conclude that the zone is unsigned. An upstream security-oblivious recursive server can strip them, and so can an attack.
Fix a local problem: resolver, clock, trust anchor and upstream server
Setting names differ by software. Use your resolver's own documentation to apply the checks below.
Check the clock
Each RRSIG carries a validity interval. When the validator checks a DNSKEY, it also checks that the signature lifetime is valid. A machine whose clock is wrong can reject good signatures. Clock skew is one of the causes of errors that persist when you requery. Correct the system time, then repeat the normal query.
Check the trust anchor and algorithm support
A resolver can validate only if it supports all algorithms used to sign the zone and has a valid trust anchor. A security-aware resolver should be configured with at least one trust anchor. If your resolver supports none of the algorithms in the zone's DS RRset, it cannot verify the path to the child. It should then treat the child zone as unsigned. Implementations may differ here, so confirm the behavior in your resolver's documentation.
Check the upstream resolver or forwarder
A security-oblivious stub does no validation itself and depends entirely on its recursive servers. Any reliance on DNSSEC then requires trusting those servers and the channel to them. If your stub uses an upstream server that interferes with or does not support DNSSEC, DNSSEC data can go missing or fail. Compare your resolver with a different validating resolver. The address below is a placeholder from the documentation range. Replace it with a real resolver address.
dig @192.0.2.53 example.com A +dnssec
dig example.com A +dnssec
If one resolver returns status: NOERROR with the ad flag and the other returns SERVFAIL, the failing resolver or its upstream is the local cause. If both fail, the cause is more likely on the domain. A validating stub should also set the CD bit.
Fix a domain-side problem: DS mismatch, expired signatures and provider changes
Note the current DS and DNSKEY records before you change anything. A wrong change can take the domain offline for validating resolvers.
DS record does not match the DNSKEY
This is the most common domain-side cause. Changing authoritative DNS providers without updating or removing the old DNSSEC records at the registrar causes validation issues. The result is an incorrect delegation. The authoritative server serves no valid DNSKEY that matches the DS record published by the parent.
The two records must agree. The DS holds a hash of the DNSKEY:
; Parent zone (published via your registrar)
example.com. 3600 IN DS 12345 13 2 00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF ; placeholder digest, not a real hash
; Child zone (served by your DNS provider)
example.com. 3600 IN DNSKEY 257 3 13 PLACEHOLDERKEYDATA00 ; placeholder key, not a real key
Compare the parent and the child, and see which provider answers:
dig example.com DS +short
dig example.com DNSKEY +short
dig example.com NS +short
You can also look up the DS and DNSKEY records and see which nameservers answer for the domain. When troubleshooting, confirm that the DS at the registrar matches what your DNS provider specifies.
For sysadmins: the DNSKEY that a DS references must be a zone key with Flags bit 7 set. Otherwise the DS and that DNSKEY must not be used in validation.
Wrong: the DNS provider changed, and the old DS stays at the registrar.
; WRONG: the registrar still publishes the old provider's DS.
; The new provider serves a different DNSKEY, so no DNSKEY matches.
example.com. 3600 IN DS 12345 13 2 00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF ; old, placeholder
Right: make the parent and child agree, using one of two paths.
- To stay signed, replace the old DS at the registrar with the DS your new DNS provider specifies, then run the checks above.
- To turn DNSSEC off, follow the order in the next subsection.
Signatures expired or zone not re-signed
Expired signatures leave a zone not correctly signed. As operational guidance, zones must be re-signed before the validity period expires. Failure to re-sign is an administrative error, and requerying does not help. The fix is at the signer, which is your DNS provider or your own signing software. Ask the provider to re-sign, or restart signing if you run it yourself.
Removing a stale DS safely
Never delete DNSKEY records while a DS still points to them. Removing DNSKEY records while DNSSEC is still enabled breaks DNS resolution. The safe order is:
- Note the current DS and DNSKEY records.
- Remove the DS record at the registrar.
- Wait at least 1.5 times the DS TTL. This is recommended practice, not an RFC requirement.
- Only then remove the DNSKEY records.
Some providers keep serving signing records after DNSSEC is disabled. Cloudflare's documentation says that after DNSSEC is disabled, Cloudflare still signs the zone and serves RRSIG, NSEC and DNSKEY records. It calls this expected behavior, not an error, though some audit tools flag it. That statement applies to Cloudflare only.
Bypass validation temporarily and what it costs
A bypass hides the symptom. It does not fix the zone. A bogus result may be a configuration error or an attack, so a bypass also removes protection for the affected names. The options are:
- Query with CD. This returns the data without the recursive server's validation failure. A validating stub should set CD for this purpose, and it then has to validate the data itself.
- Negative trust anchor. RFC 7646 defines negative trust anchors, which can mitigate validation failures by disabling validation at specified domains. This is narrower than turning validation off globally. Not every resolver supports them, so check your resolver's documentation.
- Local policy. If a resolver cannot validate, it needs a local policy on whether to accept unverified responses. A resolver must always follow local policy when deciding whether to authenticate a new public key.
Resolver operators should pay close attention to application behavior when choosing a local policy, because a wrong policy can accidentally deny service to clients. Validation also protects clients that know nothing about DNSSEC. Weakening it affects all of them.
The rule: bypass only for one named domain, only after +cd shows the data is returned, and only until the owner fixes the zone. Note your current setting before you change it. Remove the bypass once the domain validates again. Do not turn validation off permanently.
Verify the fix and what to watch afterwards
Run the normal query against a validating resolver:
dig example.com A +dnssec
Look for status: NOERROR and the ad flag in the header. A set AD bit means the response was validated. If ad is missing, remember that it is ambiguous on its own. Then check the DNSSEC chain of trust for your domain. It should show a complete chain from the root through the DS to the DNSKEY and signatures.
Resolvers may keep the old answer until its TTL expires, so a fixed domain can still fail on some resolvers for a while. Nobody can promise a propagation time. See the current state across resolvers to see what each one answers now. After any DS or DNSKEY change, recheck the chain and rerun both the normal and the +cd queries. After a DS removal, the 1.5 times TTL wait still applies before you remove DNSKEY records. To check the rest of the domain, run a wider domain health check.
Short answers to common questions
Does a validation failure always mean an attack? No. It can also be a configuration error or data corruption. Persistent failures often have an administrative cause.
Do my devices need to understand DNSSEC? No. A validating resolver with a valid trust anchor protects clients whether or not they are DNSSEC-aware. A stub that relies on a recursive server must trust that server and the channel to it.
If a response has no DNSSEC data, is the zone unsigned? Not necessarily. Missing data can come from an upstream security-oblivious server or an attack. A resolver should believe a zone is signed if it holds the zone's key, or if the parent is signed and the delegation contains a DS RRset. That is a SHOULD, not behavior every resolver shares.
Does a missing ad flag mean validation failed? No. An unset AD bit can mean validation was not attempted or that it failed. See the section on reading the flag.
References
- RFC 4035: Protocol Modifications for the DNS Security Extensions, IETF, section 9
- RFC 4033: DNS Security Introduction and Requirements, IETF, sections 2, 6, 7
- RFC 4034: Resource Records for the DNS Security Extensions, IETF, sections 2, 3, 5.2
- RFC 9364: DNS Security Extensions (DNSSEC), IETF, section 8
- Validate and secure DNS responses using DNSSEC on DNS Server in Windows Server | Microsoft Learn, learn.microsoft.com
- Troubleshooting DNSSEC ยท Cloudflare DNS docs, developers.cloudflare.com