The idea: every zone signs its records, and each parent vouches for its child's key
Plain DNS has no proof in it. A resolver believes an answer because it looks like the reply to its question. DNSSEC (RFC 4033–4035) adds signatures. Each zone signs its records with its own key. The parent zone publishes a short fingerprint of that key, signed with the parent's key. Following these links from the root down, a validating resolver can check that an answer really comes from the zone's owner and was not changed.
The canvas has the laptop and an off-path forger on the left, the recursive resolver in the middle and the three zones on the right. The band below is the chain of trust: one card per link, from the trust anchor to the answer. Pick how the zones are set up and whether the resolver validates, and press Resolve. The key tags look like real ones; the digests and signatures are toy 4-hex values, so you can compare them by eye. Today is 2026-11-19.
Why a plain DNS answer can be forged
DNS mostly runs over UDP, which has no connection. A resolver sends a question and takes the first reply that matches it: same name, same type, same 16-bit query ID, back to the same source port. Someone who cannot even see the query can still send replies that claim to come from the real server. If one fake reply arrives first and matches, the resolver caches it and hands it to all its clients until its TTL runs out. This is cache poisoning (Demo 2).
Random query IDs and random source ports are the usual defence. Together they leave a forger about 232 combinations to hit instead of 65 536, so a single race is very unlikely to succeed. But they only make guessing harder. They do not prove anything about the answer, and a forger on the path sees both values. How DNS Resolution Works shows the walk down the tree that this page builds on.
The three record types
| record | where it lives | what it holds |
|---|---|---|
DNSKEY | in the zone itself | the zone's public keys. Flag 257 is the KSK (key-signing key); flag 256 is the ZSK (zone-signing key). Each key has a short key tag, such as 20326 for the root KSK. |
RRSIG | next to every signed record set | a signature over one whole record set (all A records of a name, say), the key tag that made it, and an inception and expiration date. |
DS | in the parent zone | the child's KSK tag and a digest (hash) of it. The parent signs the DS with its own ZSK. |
Why two keys? The KSK signs only the DNSKEY set, so its fingerprint in the parent rarely has to change. The ZSK signs everything else and can be replaced often, without asking the parent. The resolver starts from one value it trusts in advance, the trust anchor: the DS of the root KSK, shipped with the resolver software (IANA's root-anchors.xml).
Validating from the top down
A validating resolver sets the DO bit ("DNSSEC OK") in its queries, so servers send the RRSIG records along. For each zone on the way down it asks for the DNSKEY set as well as the name. Then, zone by zone:
- Hash the zone's KSK and compare it with the DS it already trusts (the trust anchor for the root). Demo 5 breaks here.
- Verify the KSK's RRSIG over the DNSKEY set. Now the ZSK is trusted too.
- Verify the ZSK's RRSIG over the next DS record, or over the final answer, and check that today is between its inception and expiration. Demo 4 breaks here.
With all three zones signed, that is 3 digest matches and 6 verified RRSIGs, and the answer goes back with the AD (authenticated data) bit set (Demo 1). This is the same shape as a TLS certificate chain, with DNS zones in place of certificate authorities: see TLS Certificate Chain and Revocation. How one signature is made and checked is on How a Digital Signature Works.
Against the forger, this changes everything (Demo 3). The fake A record has no valid RRSIG, and nobody can make one without example.com's private ZSK. Because com. published a DS for example.com., the resolver knows a signature must be there. The fake answer is bogus: it is dropped, not cached, and the resolver asks again until the real, signed answer comes.
Secure, insecure, bogus
| result | when | reply to the client |
|---|---|---|
| secure | every link from the anchor to the answer verified | NOERROR, AD=1 |
| insecure | a parent proved, with a signed NSEC record, that the child has no DS | NOERROR, AD=0 |
| bogus | a signature is missing, wrong or out of date, or a DS matches no key | SERVFAIL, no answer |
Most zones are still unsigned. They are insecure, not broken: the answer is given, but without AD, and a forger could still fake it (Demo 6). The proof of "no DS" must itself be signed; otherwise a forger could strip the DS to turn a signed zone into an unsigned one.
When the zone owner breaks the chain
Bogus fails closed. A validating resolver would rather give no answer than a possibly forged one, so mistakes by the zone's owner take the whole name offline for every validating user. The two classic ones:
- Expired signatures. Every RRSIG has an expiration date (here 2026-11-10, while today is 2026-11-19). If the signing job stops, the records go bogus when their RRSIGs run out (Demo 4). The date is there so that an old, signed answer cannot be replayed forever.
- A KSK rollover done in the wrong order. The zone switched from KSK 2371 to 31406, but the parent still publishes the DS for 2371. No key in the DNSKEY set matches the trusted DS (Demo 5). The safe order is: publish the new key, put its DS in the parent, wait for the old DS to leave caches (its TTL), and only then remove the old key.
A resolver that does not validate notices neither problem: it hands out the same answer with AD=0 (Demo 7). That is also why a stub on a laptop usually just trusts the AD bit from its resolver. The bit is only as good as the resolver and the network path to it, which is why that last hop is often protected separately, for example with DNS over TLS.
What the page leaves out
Real cryptography (RSA and ECDSA keys, SHA-256 DS digests, canonical record ordering); NSEC3 and the details of negative proofs; the key tag algorithm; the TTLs of RRSIG and DNSKEY sets; the automatic trust-anchor update of RFC 5011 and the 2018 root KSK rollover; algorithm rollovers; resolvers that retry other servers or use stale data; the CD (checking disabled) bit; validating in the stub; DANE; and a real cache-poisoning race, which the page only assumes was won.