Three lookups to verify DNSSEC
Start by asking whether a validating resolver confirms the answer. Only if that fails do DS and DNSKEY deserve a look.
Only inserted into the commands in your browser.
Does it validate? · dig · Linux, macOS
What counts is the ad flag (authenticated data) on the flags line: the resolver verified the signature chain. The RRSIG record below is the signature. If ad is missing although an RRSIG is present, the resolver you asked does not validate; use one that does, such as 1.1.1.1.
dig +dnssec A example.com @1.1.1.1;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54298
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; ANSWER SECTION:
example.com. 300 IN A 192.0.2.10
example.com. 300 IN RRSIG A 13 2 300 20261111144008 20261109124008 34505 example.com. 8gRES7EQ…Does it validate? · delv · Linux
delv verifies the chain itself up to the root key and states the result in plain words: "fully validated", "unsigned answer" or "resolution failed". It ships with the BIND tools (package bind9-dnsutils).
delv @1.1.1.1 A example.com; fully validated
example.com. 300 IN A 192.0.2.10
example.com. 300 IN RRSIG A 13 2 300 20261111144503 20261109124503 34505 example.com. CxHhCcx+…Does it validate? · PowerShell · Windows
-DnssecOk requests the signatures: for a signed domain extra rows of type RRSIG appear. PowerShell does not verify the chain itself.
Resolve-DnsName -Name example.com -Type A -Server 1.1.1.1 -DnssecOkDS record (parent zone) · dig · Linux, macOS
The DS record sits at the registry and points to the zone's key: key tag, algorithm (13 = ECDSA P-256), digest type (2 = SHA-256), digest. An empty answer means the domain is unsigned or the DS was never submitted.
dig +short DS example.com2371 13 2 C988EC423E3880EB8DD8A46FE06CA230EE23F35B578D64E78B29C3E1 C83D245ADS record (parent zone) · delv · Linux
The same record, with confirmation that the parent zone signed it correctly.
delv @1.1.1.1 DS example.com; fully validated
example.com. 84668 IN DS 2371 13 2 C988EC423E3880EB8DD8A46FE06CA230EE23F35B578D64E78B29C3E1 C83D245ADS record (parent zone) · PowerShell · Windows
Resolve-DnsName knows the DS, DNSKEY and RRSIG types. The output lists key tag, algorithm and digest just like dig.
Resolve-DnsName -Name example.com -Type DS -Server 1.1.1.1DNSKEY (zone) · dig · Linux, macOS
Lists the zone's keys with their IDs. The KSK (257) must carry the same key id as the key tag in the DS record, here 2371. If they do not match, the domain is unreachable for validating resolvers.
dig +noall +answer +multiline DNSKEY example.com | grep -E "DNSKEY|key id"example.com. 3600 IN DNSKEY 256 3 13 (
) ; ZSK; alg = ECDSAP256SHA256 ; key id = 34505
example.com. 3600 IN DNSKEY 257 3 13 (
) ; KSK; alg = ECDSAP256SHA256 ; key id = 2371DNSKEY (zone) · delv · Linux
delv appends key type, algorithm and key id as a comment after each key.
delv @1.1.1.1 DNSKEY example.com; fully validated
example.com. 177 IN DNSKEY 256 3 13 oJMRESz5… ; ZSK; alg = ECDSAP256SHA256 ; key id = 34505
example.com. 177 IN DNSKEY 257 3 13 mdsswUyr… ; KSK; alg = ECDSAP256SHA256 ; key id = 2371DNSKEY (zone) · PowerShell · Windows
Shows the zone's keys. PowerShell does not compute the key id; for matching against the DS record dig or delv is more convenient.
Resolve-DnsName -Name example.com -Type DNSKEY -Server 1.1.1.1Your router or ISP resolver often does not set the ad flag even though the domain is signed correctly. In our test the same query through a home router returned the signature but no ad. That is why the commands name @1.1.1.1 explicitly; 8.8.8.8 and 9.9.9.9 validate as well.
What a DNSSEC failure looks like
When the chain is broken, a validating resolver answers SERVFAIL as if the domain did not exist. To confirm DNSSEC is the culprit, repeat the query with +cd (checking disabled): if that returns an answer, the signature is the problem and not the name server. The test domain dnssec-failed.org is signed incorrectly on purpose:
$ dig A dnssec-failed.org @1.1.1.1
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 34409
; EDE: 9 (DNSKEY Missing): (no SEP matching the DS found for dnssec-failed.org.)
$ dig +cd A dnssec-failed.org @1.1.1.1
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19027
;; flags: qr rd ra cd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1The EDE line (Extended DNS Error) gives the reason in words; recent dig versions print it like this, older ones such as dig 9.10 on macOS only show raw bytes after "OPT=15". delv reports "resolution failed" for the same domain and "broken trust chain" with +cd.
delv on macOS and behind a home router
We ran into two pitfalls while testing. The delv that ships with macOS stops with "no crypto support" and "No trusted keys were loaded"; it is built without cryptography and useless for DNSSEC. Use dig with a validating resolver there, or install BIND through Homebrew.
On Linux, delv without a server argument often fails with "resolution failed: SERVFAIL" when the local resolver (router, Docker, some VPNs) does not pass DNSSEC records through. With @1.1.1.1 the same query succeeds.
Reading the results
What the lookups show and how to fix it:
- SERVFAIL, but an answer with +cd: the chain is broken. Usually the previous provider's DS record is still at the registry after a DNS move. Remove it at the registrar or submit the new one.
- DS present, DNSKEY empty: the zone is not signed at the current DNS provider. Remove the DS or enable DNSSEC there.
- The key tag in the DS matches no key id: the DS belongs to an old key, for example after a failed key rollover.
- No ad flag but an RRSIG in the answer: nothing wrong with the domain. The resolver you asked does not validate.
- No RRSIG and an empty DS: the domain is unsigned. delv calls this "unsigned answer". A valid state, just unprotected.
- nslookup prints "rdata_43" and "rdata_48": nslookup does not know DS (type 43) and DNSKEY (type 48) by name; the values after it are still correct.
- Failures that come and go: a signature has expired. The RRSIG carries expiry and inception as timestamps (YYYYMMDDHHMMSS) right after the original TTL.
Checking without a terminal
The DNSSEC checker combines the three lookups: the DS record in the parent zone, confirmation by a validating resolver (AD flag) and the distinction between "unsigned" and "signed but not validatable". How to enable DNSSEC without an outage, and what has to happen to the DS record during a DNS move, is covered in the guide DNSSEC for agencies.