What Is DNSSEC? How the Chain of Trust, Keys, and Signatures Secure DNS

Domain Name System Security Extensions (DNSSEC) is a security feature that adds cryptographic digital signatures to your DNS records so attackers cannot hijack or spoof your domain's IP address. Validating resolvers verify these signatures across a chain of trust from the root zone down to your domain. The signatures of DNSSEC protect data integrity without encrypting DNS queries.

Root Zone trust anchor .com Registry TLD Your Domain example.com DS DS Validating Resolver checks every link DNSKEY KSK + ZSK signs Your Records (signed with ZSK) every link must verify: one break = SERVFAIL for the entire domain
The DNSSEC chain of trust: root to TLD to your domain

Why Was DNSSEC Created? (Solving the Plaintext DNS Cache Poisoning Flaw)

DNSSEC was created to resolve plaintext DNS cache poisoning by establishing a foundational security triad: origin authentication of DNS data, data integrity, and authenticated denial of existence (NSEC/NSEC3), all while maintaining backward compatibility with standard DNS. Original DNS protocol specifications transmitted UDP port 53 responses without cryptographic verification, allowing attackers to inject forged IP addresses into recursive resolver caches.

In classic DNS architectures, a recursive resolver verified incoming response packets solely by checking whether the source IP address, UDP port, and 16-bit Transaction ID (representing 65,536 potential values) matched its pending query. In July 2008, security researcher Dan Kaminsky demonstrated that an off-path attacker could flood recursive resolvers with forged referral responses for randomized subdomains. Attackers guessed the 16-bit Transaction ID within seconds and poisoned parent NS records in cache to redirect entire domains. Once poisoned, the resolver routed all subsequent traffic for that domain to an attacker-controlled destination, facilitating credential theft and man-in-the-middle attacks as documented in DNS Cache Poisoning and DNS Hijacking.

The Internet Engineering Task Force (IETF) resolved this architectural flaw by publishing modern DNSSEC specifications in 2005. On July 15, 2010, the Internet Assigned Numbers Authority (IANA) and ICANN formally signed the DNS Root Zone (.), creating the global cryptographic trust anchor required to validate every signed Top-Level Domain (TLD) and second-level domain worldwide. Background concepts and operational mechanics are covered in What Is DNS and DNS Security.

What Are the 4 Core DNSSEC Record Types?

DNSSEC operates by publishing 4 specialized resource record types (RRSIG, DNSKEY, DS, and NSEC/NSEC3) alongside standard zone records. The table below defines the 4 core DNSSEC record types by IANA type code, zone location, and cryptographic function.

RecordRoleKey detail
RRSIG (Type 46)Digital signature over each record setRequires refresh before signature expiry
DNSKEY (Type 48)Zone signing key (flag 256) and key signing key (flag 257)The KSK signs the DNSKEY set
DS (Type 43)Hash of the KSK published in the parent zoneThe chain of trust link at the registrar
NSEC / NSEC3 (Type 47 / 50)Authenticated denial of existenceProves a name genuinely does not exist

DNSSEC enforces a fundamental operational rule: it signs entire Resource Record Sets (RRsets) rather than individual records. The authoritative nameserver groups all matching records into a single canonical RRset and generates one comprehensive RRSIG signature over the collection when a domain publishes multiple A records for round-robin load balancing. Resolvers always retrieve and validate the entire set simultaneously. Modern registrars also support automated parent-child updates through Child DS (CDS, Type 59) and Child DNSKEY (CDNSKEY, Type 60) records, allowing child zones to publish key rollovers automatically to supporting registries. Record structures and lookup tools are detailed in DS Record, DNSKEY Record, DS Record Lookup, and DNSKEY Record Lookup.

Why Does Modern DNSSEC Use NSEC3 or Black Lies Instead of Plain NSEC?

Modern DNSSEC deployments use NSEC3 or Compact Denial of Existence instead of plain NSEC records to prevent attackers from enumerating every subdomain in a zone file.

The original NSEC record proved that a requested record did not exist by linking existing hostnames in alphabetical order (for example, confirming that nothing exists between api.example.com and dev.example.com). This sequential linking created a critical vulnerability called DNSSEC Zone Walking: an external attacker could issue successive queries to extract every active record in the zone. NSEC3 resolved zone walking by replacing plain-text domain names with salted SHA-1 cryptographic hashes. Advanced Anycast platforms (such as Cloudflare) deploy Compact Denial of Existence (informally known as Black Lies), dynamically generating a synthetic NSEC record that asserts non-existence specifically for the queried name, preventing zone enumeration while eliminating the computational burden of NSEC3 hash iterations.

What Is the Difference Between a Zone Signing Key (ZSK) and a Key Signing Key (KSK)?

DNSSEC splits public-key management inside DNSKEY records into 2 distinct key roles: the Zone Signing Key (ZSK) (Flag 256) that signs individual record sets, and the Key Signing Key (KSK) (Flag 257) that signs the DNSKEY RRset and links to the parent zone's DS record.

Separating cryptographic responsibilities across two specialized key pairs solves a fundamental administrative dilemma through 2 distinct roles:

  • Zone Signing Key (ZSK, DNSKEY Flag 256): The Zone Signing Key (ZSK, Flag 256) signs individual RRsets (A, AAAA, MX, TXT, NS, SOA, NSEC3) inside the child zone. The private key of the ZSK generates an RRSIG signature over every routine zone RRset, while the public key is published in the zone's DNSKEY RRset. Because parent TLD registries store no record of the ZSK, DNS providers rotate the ZSK every 30 to 90 days automatically without requiring registrar intervention.
  • Key Signing Key (KSK, DNSKEY Flag 257): The Key Signing Key (KSK, Flag 257) signs only the zone's DNSKEY RRset to authorize the ZSK. The private key of the KSK cryptographically validates both the ZSK and itself, while a SHA-256 hash of the public KSK is published in the parent TLD zone as a Delegation Signer (DS) record. Because rotating a KSK requires publishing a new DS record at the registrar, organizations rotate the KSK on longer intervals of 12 to 24 months.

Dividing signing duties between a frequently rotated ZSK and a stable KSK minimizes administrative overhead while preserving cryptographic resilience.

How Does the DNSSEC Chain of Trust Work Step by Step?

To validate a signed DNS response, a recursive resolver executes 7 cryptographic verification steps tracing the Chain of Trust from the child zone up to the hardcoded IANA Root Zone trust anchor.

Validating recursive resolvers verify data authenticity through 7 sequential operations:

  1. Set the DNSSEC OK (DO=1) bit within the EDNS0 OPT pseudo-header when querying the authoritative nameserver for example.com A, signaling that the resolver requires RRSIG signature records in the response.
  2. Retrieve the requested A RRset alongside its accompanying RRSIG signature record from the authoritative nameserver for example.com.
  3. Query the authoritative nameserver for the zone's DNSKEY RRset (containing the public ZSK Flag 256 and KSK Flag 257) along with the RRSIG signature covering that DNSKEY set.
  4. Verify the A record's RRSIG signature using the public ZSK (DNSKEY 256), confirming that the returned IP addresses were signed by example.com and that the signature falls within valid inception and expiration timestamps.
  5. Validate the DNSKEY RRset's RRSIG signature using the public KSK (DNSKEY 257), establishing that the KSK authorizes the active ZSK.
  6. Fetch the Delegation Signer (DS) record for example.com from the parent .com TLD nameserver, hash the child zone's public KSK (DNSKEY 257) using SHA-256, and confirm the computed hash matches the parent DS digest byte-for-byte.
  7. Repeat the verification process recursively up to the Root Zone (.), validating the .com DS record against the Root KSK, which is permanently embedded as a trusted anchor in resolver software through the international ICANN Root Key Signing Ceremony.

The resolver marks the record as authentic and delivers it to the client application once every link in this cryptographic hierarchy matches, as detailed in How DNS Works and verified with the DNSSEC Checker.

What Are the 3 DNSSEC Validation States in Recursive Resolvers?

A DNSSEC-aware recursive resolver classifies every DNS lookup into 1 of 3 deterministic validation states: Secure, Insecure, or Bogus. The table below defines each validation state by DNS header flags, RCODE output, and root cause.

StateMeaningWhat you see
SecureChain of trust validates to the rootAD flag set on the answer
InsecureZone is unsigned; no DS at the parentNormal answer, no AD flag
BogusBroken chain: mismatched DS, expired RRSIGSERVFAIL for the whole zone

Validating resolvers refuse to serve unverified data and return a SERVFAIL (RCODE 2) response whenever a configuration error breaks the chain of trust. System administrators can isolate whether an outage is caused by DNSSEC validation failure in seconds by querying public resolvers with the Checking Disabled (+cd) flag:

Step 1: Standard DNSSEC query (fails with SERVFAIL on broken chain):

dig example.com A @1.1.1.1 +dnssec

Step 2: Checking Disabled query (+cd flag bypasses DNSSEC validation):

dig example.com A @1.1.1.1 +cd

An invalid parent DS record, mismatched KSK, or expired RRSIG signature is the confirmed cause of a domain outage if Step 1 produces SERVFAIL while Step 2 returns NOERROR with the target IP address. Run that exact CD=0 vs CD=1 check across validating resolvers directly in your browser with the DNS Resolver Tester, and verify parent-child consistency using the DNS Delegation Checker.

How Do DNSSEC Cryptographic Algorithms Compare? (RSA Algorithm 8 vs ECDSA Algorithm 13)

Security standards recommend Algorithm 13 (ECDSAP256SHA256) or Algorithm 15 (Ed25519) for all modern DNSSEC deployments because elliptic-curve keys produce compact signatures, preventing UDP packet fragmentation and DNS amplification abuse. The table below compares the 4 primary DNSSEC cryptographic algorithms by RFC standard, implementation status, and network packet impact.

Algorithm Number & NameRFC StandardRFC 8624 StatusSignature Size & Packet Impact
Alg 5 (RSASHA1) / Alg 7RFC 3110 / RFC 5155MUST NOT SignObsolete SHA-1; insecure and rejected by modern registrars
Alg 8 (RSASHA256)RFC 5702MUST Implement (Legacy)2048-bit key yields 256-byte signatures; inflates UDP packets (>1,200B) and increases DNS amplification DDoS factor
Alg 13 (ECDSAP256SHA256)RFC 6605MUST Implement (Recommended Default)256-bit elliptic curve (equal to 3072-bit RSA strength) with compact 64-byte signatures; used by Cloudflare and Route 53
Alg 15 (Ed25519)RFC 8080RECOMMENDEDHigh-speed Edwards-curve 64-byte signatures; supported by modern resolvers and registries

Choosing the correct algorithm directly affects network security and performance: legacy Algorithm 8 (RSASHA256) keys require 2048 bits to maintain adequate security, inflating DNS response packets beyond 1,200 bytes. These large responses force resolvers to negotiate Extended DNS (EDNS0) buffer sizes and provide threat actors with potent reflection targets for DNS Amplification Attacks. Algorithm 13 delivers equivalent 128-bit cryptographic security using 256-bit elliptic curves that generate compact 64-byte signatures, allowing responses to fit comfortably inside standard 512-byte UDP envelopes.

What Is the Difference Between DNSSEC, DoH/DoT, and HTTPS/TLS?

DNSSEC, encrypted DNS transport (DoH and DoT), and HTTPS/TLS operate at 3 complementary security layers: DNSSEC authenticates record integrity, DoH and DoT encrypt the recursive query channel, and HTTPS/TLS encrypts the final web application connection.

Understanding internet security requires distinguishing authentication from confidentiality across 3 distinct protocols:

  • DNSSEC Authenticates Data Integrity (Zero Encryption): DNSSEC cryptographic signatures verify that DNS records originate from the genuine domain owner and were not altered by intermediate resolvers. DNSSEC does not encrypt query payloads: queries and responses remain visible as plaintext across intermediate networks unless wrapped in an encrypted transport.
  • DoH and DoT Encrypt Transport (Zero Origin Authentication): DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) encrypt the last-mile communication between client stub resolvers and upstream recursive resolvers, preventing eavesdropping and tampering by local network operators or ISPs. However, a compromised recursive resolver can deliver poisoned records through an encrypted DoH session if the queried domain lacks DNSSEC, as detailed in DNS-over-HTTPS vs DNS-over-TLS.
  • HTTPS/TLS and DANE (End-to-End Application Encryption): Once DNSSEC delivers an authenticated IP address, HTTPS/TLS encrypts the application session between the browser and web server. The DNS-Based Authentication of Named Entities protocol (DANE) uses DNSSEC to publish TLSA records directly in DNS, pinning valid TLS certificates for mail exchangers and eliminating dependence on commercial certificate authorities, as explored in HTTPS vs DNSSEC.

Deploying DNSSEC alongside encrypted DNS transport and TLS certificates establishes end-to-end security protecting domain resolution, network transmission, and application data.

How Do You Enable, Migrate, and Disable DNSSEC Safely Without Breaking Your Domain?

To enable DNSSEC or migrate a signed domain between DNS providers without triggering a SERVFAIL outage, synchronize child zone DNSKEY signing and parent registrar DS publication in strict reverse order during activation and deactivation.

Domain administrators execute DNSSEC lifecycle tasks through 2 strict operational sequences:

Workflow A: Enabling DNSSEC (Child Zone Signing First, Parent DS Second):

  1. Enable DNSSEC signing within your authoritative DNS provider dashboard (such as Cloudflare, AWS Route 53, or Google Cloud DNS) so the nameserver generates active ZSK and KSK pairs and publishes signed RRSIG records.
  2. Copy the generated Delegation Signer (DS) record parameters (Key Tag, Algorithm 13, Digest Type 2 SHA-256, and Digest hex string) from your DNS provider.
  3. Publish the DS record in your domain registrar's DNSSEC management interface, allowing the parent TLD registry to insert the DS record into the top-level zone.
  4. Verify the completed chain of trust using the DNSSEC Checker, following specific setup steps in How to Enable DNSSEC in Cloudflare.

Workflow B: Disabling DNSSEC or Migrating Nameservers (Parent DS Removal First, Wait Out TTL, Child Zone Second)

Changing nameservers on a signed domain without removing the parent DS record causes global resolution failure: validating recursive resolvers query the new nameservers, find no matching KSK, and reject all queries with SERVFAIL. Delete the old DS record at your domain registrar and wait for the parent DS TTL (typically 1 to 24 hours) to expire before switching authoritative nameservers between DNS providers.

Deploying comprehensive DNS defenses requires balancing cryptographic signing with operational controls across nameservers, registrar locks, and monitoring tools. Administrators can audit their complete domain posture using the DNS Threat Protection Checklist and validate live chains of trust anytime with the DNSSEC Checker.

Frequently asked questions

Does DNSSEC encrypt my DNS traffic?+

No, DNSSEC authenticates the origin and integrity of DNS records using cryptographic digital signatures (RRSIG), but the records themselves remain plaintext. Pair DNSSEC with DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT) to encrypt DNS queries in transit.

Why did my website stop working with SERVFAIL after changing nameservers?+

Switching authoritative nameservers without first removing the old provider's DS (Delegation Signer) record at your domain registrar breaks the DNSSEC chain of trust. Validating resolvers (such as 1.1.1.1 and 8.8.8.8) treat the mismatch as tampering and return SERVFAIL (RCODE 2).

Does enabling DNSSEC slow down DNS lookups?+

With modern Algorithm 13 (ECDSAP256SHA256) keys, DNSSEC adds near-zero latency because signatures are only 64 bytes and validating recursive resolvers cache both the verified resource records and the domain's DNSKEYs for the duration of their TTL. In real-world performance benchmarks, recursive resolvers complete subsequent validated lookups directly from local memory without performing extra network round trips.

How do I check if DNSSEC is enabled and valid on my domain?+

Run your domain through the DNSSEC Checker to verify that a parent DS record is present at the TLD registry, a matching KSK (Flag 257) and ZSK (Flag 256) exist in your DNSKEY RRset, and resolvers return the Authenticated Data (AD=1) flag. In practice, the most critical mistake during DNS provider migrations is forgetting to delete old DS records from your registrar before switching nameservers, which causes catastrophic global resolution failure (SERVFAIL) across all validating resolvers.

Last verified: 2026-11-28