DNSSEC explained — the chain of trust, KSK/ZSK roles and deployment caveats
Classic DNS has no built-in way to prove that a response actually came from the zone owner. A man-in-the-middle, a malicious recursive resolver or a successful cache poisoning attack can swap an answer and the client has no way to tell. DNSSEC fixes that by signing DNS data with public-key cryptography and tying every signature back to a single trust anchor at the root.
This article walks through the chain of trust, the two-key design (KSK and ZSK), how a validating resolver actually checks a response, and the operational footguns that make DNSSEC harder to run than it looks.
What DNSSEC adds
DNSSEC is defined by RFCs 4033, 4034 and 4035. It introduces four new record types:
| Record | Purpose |
|---|---|
DNSKEY | Public keys used to verify signatures in this zone |
RRSIG | A signature over an RRset, produced by a DNSKEY |
DS | Delegation Signer — a hash of a child zone's DNSKEY, published in the parent zone |
NSEC / NSEC3 | Authenticated denial of existence |
"DNSSEC provides authentication of DNS data, authenticated denial of existence, and data integrity." — RFC 4033 §3
What DNSSEC explicitly does not provide is confidentiality. The queries and responses are still observable on the wire; you need DoH or DoT for that.
The chain of trust
The trust anchor is the root zone's KSK, distributed with every validating resolver. When a resolver validates www.example.com, it walks the chain top-down:
- Verify the root KSK matches the configured trust anchor and use it to validate the root's DNSKEY RRset.
- Read the
DSrecord forcom.from the root and confirm it hashes tocom.'s KSK. - Use
com.'s DNSKEY to validate theDSforexample.com.. - Use
example.com.'s DNSKEY to validate theRRSIGover theArecord forwww.example.com..
Any broken link in that chain produces a SERVFAIL at the resolver, which is the user-visible signature of a DNSSEC failure.
KSK and ZSK — why two keys?
A KSK (Key Signing Key) signs only the DNSKEY RRset. It is the key referenced by the parent zone's DS record. KSKs are kept long-lived and rotated rarely because every rotation requires a coordinated update to the parent.
A ZSK (Zone Signing Key) signs every other RRset in the zone. ZSKs are typically smaller, rotated every 1-3 months, and replaced without touching the parent. This split lets operators rotate the day-to-day signing material frequently while leaving the delegation alone.
You can inspect a real zone's keys with dig:
dig +dnssec DNSKEY example.com
dig +dnssec DS example.com @a.gtld-servers.net
Validation in practice
A validating resolver checks every RRset in a response. On success it sets the AD (Authenticated Data) bit and serves the answer. On failure it returns SERVFAIL and (with +cd) lets the client opt out of validation. SecDNS validates DNSSEC by default — see DNSSEC validation — and surfaces validation failures in the per-query log so operators can spot misconfigured zones quickly.
NSEC and NSEC3 deserve a special call-out: they let a zone prove that a name does not exist without listing every name in the zone. NSEC3 hashes the labels so a curious client cannot just walk the zone, though offline dictionary attacks against NSEC3 are well documented.
Deployment caveats
DNSSEC is a powerful protocol with a long list of ways to go wrong:
- Signature expiry: RRSIGs have a validity window. If the signer falls behind, the zone goes dark for validating resolvers, even though plain DNS still works. Monitor expiry headroom, not just record presence.
- DS desync: when you change KSKs, the parent zone must publish the new DS before the old DNSKEY is removed. CDS and CDNSKEY (RFC 7344) automate this for compliant registrars, but coverage is still mixed.
- Algorithm rollover: switching from RSA-SHA256 to ECDSA-P256 requires a careful dual-signing window so no resolver sees an unsigned answer.
- Large responses: DNSSEC responses are larger than plain DNS. Make sure the path supports EDNS(0) buffer sizes around 1232 bytes and falls back to TCP/53 cleanly.
If those constraints sound heavy, most teams delegate DNSSEC to their hosted DNS provider. SecDNS authoritative hosting signs zones automatically and handles ZSK rotation and parent DS updates where the registrar supports CDS.
Further reading
- Glossary: DNSSEC, DNS, DoH, DoT
- Features: DNSSEC validation, DNS over HTTPS, DNS over TLS
- Learn: DNS basics, How DNS works in depth, How DNS attacks work