DNSSEC is good at proving that a record you asked for is genuine, but it faces a harder problem too: how do you prove, with a signature, that a name does not exist? You cannot sign a record that is not there. The answer is authenticated denial of existence, and DNSSEC offers two mechanisms for it, NSEC and NSEC3. The choice between them decides whether a stranger can list every name in your zone. This guide explains how each one proves a name is missing, why plain NSEC lets anyone walk your entire zone, how NSEC3 closes that gap with hashing and opt-out, and the small costs you take on in exchange.
The problem: signing an absence
When a resolver asks a signed zone for a name that does not exist, it expects an NXDOMAIN answer it can cryptographically trust. A plain NXDOMAIN with no proof could be forged by an attacker to hide a record that really is there. DNSSEC solves this by signing statements about the gaps between names that do exist, so the server can prove that nothing lives in the gap your query landed in. This is also what makes negative answers cacheable in a trustworthy way, a topic our guide on negative caching and NXDOMAIN covers in depth.
How NSEC proves a name is missing
NSEC, defined in RFC 4034 and RFC 4035, works by chaining the existing names of a zone in canonical order. Each NSEC record names its owner and the next existing name after it, and lists the record types that owner has. To prove that alpha-is-missing does not exist, the server returns the signed NSEC record whose range spans it, for example the record saying the next name after "alpha.example.com" is "beta.example.com" with nothing in between. The signature over that NSEC record is the proof.
The weakness is baked into that design. Because each NSEC record points at the very next real name, anyone can start at the apex, read the next name, query it, read its next name, and keep going until they have reconstructed the entire zone. This is called zone walking, and it turns a signed zone into a public directory of every hostname you have, which may include internal or non-public names you never intended to advertise.
How NSEC3 closes the gap
NSEC3, defined in RFC 5155, breaks the walk by proving the gaps over hashed names instead of plain ones. Each owner name is run through a hash function with a salt and a number of iterations, the hashes are sorted, and the NSEC3 records chain those hashes rather than the readable names. A resolver can still verify that the hash of the name it asked for falls in a signed gap, so denial of existence still works, but someone trying to walk the zone only recovers a list of hashes, not the names themselves.
NSEC3 also adds the opt-out flag. In a large delegation-heavy zone such as a top-level domain, most child delegations are not signed and do not need individual denial proofs. Opt-out lets the zone skip generating NSEC3 records for those unsigned delegations, which dramatically shrinks the number of records and signatures a huge zone must carry. The trade-off is that opt-out gives up proof of non-existence for those unsigned names, which is an acceptable deal for a registry but rarely needed in an ordinary zone.
| Property | NSEC | NSEC3 |
|---|---|---|
| Chains over | Plain names | Hashed names |
| Zone walking | Trivial; whole zone is enumerable | Resists online walking; hashes only |
| Extra computation | None | Hashing per name, at sign and query time |
| Opt-out for unsigned delegations | Not available | Available, shrinks large zones |
| Typical fit | Simple public zones | Zones wanting enumeration resistance or opt-out |
The cost of NSEC3 and getting its parameters right
NSEC3 is not free. Hashing adds CPU work both when the zone is signed and when a server answers, and the hashes are only resistant, not immune, to recovery: an attacker can still take the published hashes offline and brute-force common or short names, especially with many iterations wasted on weak protection. Because of this, RFC 9276, published in August 2022, lays out best-current parameters: use zero extra iterations and an empty salt. As of November 2026 validating resolvers increasingly treat zones with high iteration counts as insecure or return an error, so more iterations can actually harm you rather than help. More hashing rounds give almost no real protection against a determined attacker while slowing every validation, so the modern guidance is to keep NSEC3 simple.
Choosing and checking which your zone uses
Most of this is handled by your signer, but you should know what it produced and confirm it follows current guidance.
- Decide what you actually need: pick NSEC3 if hiding your full list of names matters, or if you run a large delegation zone that benefits from opt-out; plain NSEC is fine and simpler otherwise.
- If you use NSEC3, configure your signer for zero additional iterations and no salt, per RFC 9276.
- Check the live zone with
dig NSEC3PARAM example.com +short; an answer confirms NSEC3 is in use and shows its iteration and salt values. - Trigger a denial proof with a query for a random nonexistent name using
dig +dnssec nothere-xyz.example.comand confirm the response carries NSEC or NSEC3 records with valid RRSIGs. - Validate the whole chain with
delv example.comso you know the denial proofs verify end to end.
Frequently asked questions
Does NSEC really let anyone list my whole zone?
Yes. Because each NSEC record names the next existing name, a stranger can follow the chain from one name to the next and reconstruct every record owner in the zone. If that matters for your zone, use NSEC3 instead.
Does NSEC3 make zone enumeration impossible?
No, it makes it harder. NSEC3 publishes hashes rather than names, which stops trivial online walking, but an attacker can still take the hashes offline and brute-force guessable names. It raises the cost of enumeration rather than eliminating it.
How many NSEC3 iterations should I use?
Zero additional iterations, with an empty salt, following RFC 9276. Extra iterations add little real protection and slow every validation, and as of November 2026 some resolvers treat high counts as insecure, so more is worse, not better.
What is the NSEC3 opt-out flag for?
Opt-out lets a zone skip denial-of-existence records for unsigned delegations, which greatly reduces the record count in huge delegation-heavy zones like top-level domains. It gives up proof of non-existence for those unsigned names, a trade-off that rarely matters outside a registry.
Which should an ordinary small zone use?
Either works. Plain NSEC is simpler and slightly cheaper to serve, while NSEC3 with modern parameters adds enumeration resistance at a small computational cost. Choose NSEC3 only if hiding your list of names is a real concern for you.
Authenticated denial of existence is the half of DNSSEC that is easy to overlook until someone enumerates your zone, so it is worth knowing which mechanism you run and confirming its parameters. To check whether your domain is signed and see its records resolve cleanly, run it through the Valla DNS domain health check, and pair this with our explainer on DNSSEC basics: DS, DNSKEY, and RRSIG.