Check DNSSEC with dig and delv

· 4 min read

Whether DNSSEC works for a domain is decided in three places: the DS record at the registry, the keys in the zone, and a validating resolver confirming the chain. Each takes one command to check. This guide shows them for dig, delv and PowerShell and explains what a DNSSEC failure looks like in the output.

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.

What to check
Tool

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.

Shell
dig +dnssec A example.com @1.1.1.1
Sample output
;; ->>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).

Shell
delv @1.1.1.1 A example.com
Sample output
; 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.

PowerShell
Resolve-DnsName -Name example.com -Type A -Server 1.1.1.1 -DnssecOk

DS 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.

Shell
dig +short DS example.com
Sample output
2371 13 2 C988EC423E3880EB8DD8A46FE06CA230EE23F35B578D64E78B29C3E1 C83D245A

DS record (parent zone) · delv · Linux

The same record, with confirmation that the parent zone signed it correctly.

Shell
delv @1.1.1.1 DS example.com
Sample output
; fully validated
example.com.		84668	IN	DS	2371 13 2 C988EC423E3880EB8DD8A46FE06CA230EE23F35B578D64E78B29C3E1 C83D245A

DS 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.

PowerShell
Resolve-DnsName -Name example.com -Type DS -Server 1.1.1.1

DNSKEY (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.

Shell
dig +noall +answer +multiline DNSKEY example.com | grep -E "DNSKEY|key id"
Sample output
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 = 2371

DNSKEY (zone) · delv · Linux

delv appends key type, algorithm and key id as a comment after each key.

Shell
delv @1.1.1.1 DNSKEY example.com
Sample output
; 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 = 2371

DNSKEY (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.

PowerShell
Resolve-DnsName -Name example.com -Type DNSKEY -Server 1.1.1.1

Your 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:

Shell
$ 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: 1

The 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.

Frequently asked questions

How do I check with dig whether DNSSEC is enabled?
dig +dnssec A example.com @1.1.1.1. If the flags line contains ad and an RRSIG record appears, the domain is signed and the chain is valid. dig +short DS example.com also shows whether a DS record exists at the registry.
What does the AD flag mean?
Authenticated Data: the resolver checked every signature from the root zone down to the record and found them valid. The resolver sets the flag, not the domain's name server, so it depends on whom you ask.
What is the difference between dig +dnssec and delv?
dig shows what a resolver answers and trusts its validation. delv verifies the signature chain itself against the built-in root key and prints the verdict on the first line.
Why does my domain return SERVFAIL although the name server answers?
The most common cause is a DS record at the registry that does not match the zone's keys. Validating resolvers then discard every answer. Test with dig +cd: if that returns an answer, DNSSEC is the reason.
Check now

Free DNSSEC test: DS record, resolver validation and broken signature chains. Shows whether validating resolvers like Google and Cloudflare still reach you.

DomainWarn checks DNSSEC for all client domains on a schedule and alerts you to an orphaned DS record or an expiring signature before the domain vanishes for validating resolvers.

Monitor this domain continuously14-day free trial, no credit card.

More guides