A DNSKEY record is the resource record type that publishes the public keys of a DNSSEC-signed zone, allowing validating resolvers to check the digital signatures attached to the zone’s data. Among the DNS records that make up the naming system of the Internet, it is the anchor of cryptographic authenticity: without it, the RRSIG signatures on A, MX or TXT records cannot be verified, and DNSSEC provides no protection.
The record type was defined in RFC 4034 as part of the DNSSEC specification and carries type code 48. It always sits at the zone apex, never at an arbitrary name, and it works in tandem with the DS record stored in the parent zone, which links the child’s keys into the global chain of trust that begins at the root.
How the DNSKEY record anchors DNSSEC validation
The DNSKEY record makes signature verification possible by giving resolvers the public half of the zone’s key pairs. The zone operator keeps the private keys offline or in a signing system, signs every record set with them, and publishes the matching public keys as DNSKEY records at the apex.
A validating resolver follows a fixed sequence. It fetches the record set it needs together with its RRSIG signature, retrieves the zone’s DNSKEY set, and checks that a key with the matching key tag and algorithm verifies the signature. It then confirms that the DNSKEY set itself is trustworthy by matching one of its keys against a DS record in the parent zone, repeating the process upward until it reaches the configured root trust anchor.
The following table summarizes the role each related record plays in this validation path.
| Record | Location | Role in validation |
|---|---|---|
| DNSKEY | Child zone apex | Publishes public keys of the zone |
| RRSIG | Next to every signed record set | Carries the signature over that set |
| DS | Parent zone at the delegation | Holds a hash of the child’s key |
| NSEC or NSEC3 | Throughout the child zone | Proves that a name or type does not exist |
| Root trust anchor | Resolver configuration | Starting point of the chain of trust |
Fields of the DNSKEY record
Every DNSKEY record has four fields in its RDATA: flags, protocol, algorithm and the public key. In presentation format a typical entry reads example.org. 3600 IN DNSKEY 257 3 13 mdsswUyr3DPW..., where the numbers before the key are the first three fields.
| Field | Size | Typical values | Meaning |
|---|---|---|---|
| Flags | 16 bits | 256 or 257 | Zone Key bit and Secure Entry Point bit |
| Protocol | 8 bits | Always 3 | Fixed value; any other value is invalid |
| Algorithm | 8 bits | 8, 13, 15 | Signing algorithm used with the key |
| Public key | Variable | Base64 text | Key material in algorithm-specific format |
The flags value 256 marks a zone key without the Secure Entry Point bit, conventionally a zone signing key. The flags value 257 sets the Secure Entry Point (SEP) bit as well, signaling that the key is intended to be referenced from the parent through a DS record. The SEP bit is only a hint for tooling and operators; validators do not treat it as a security property.
Resolvers also compute a 16-bit key tag from the record contents. The key tag is not stored as a field, but it appears in RRSIG and DS records so that a resolver can quickly select the right key when several are published. Because key tags can collide, validators must try every matching key rather than trusting the tag alone.
Key signing keys and zone signing keys
Most signed zones publish at least two DNSKEY records with different duties, a split that lets operators rotate frequently used keys without contacting the parent registry. The key signing key (KSK) signs only the DNSKEY record set, while the zone signing key (ZSK) signs all other record sets in the zone.
| Property | Key signing key | Zone signing key | Combined signing key |
|---|---|---|---|
| Flags value | 257 | 256 | 257 |
| Signs | DNSKEY set only | All other record sets | Every record set |
| Referenced by DS | Yes | No | Yes |
| Typical rollover | Every few years or never | Monthly to yearly | Rarely, with parent update |
| Main benefit | Stable parent link | Easy rotation | Simpler operations |
A combined signing key (CSK) performs both roles with a single key. With modern elliptic curve algorithms such as ECDSA P-256 (algorithm 13) and Ed25519 (algorithm 15), keys and signatures are small, so many operators now prefer a single CSK and accept that any rollover requires a DS update at the parent.
Algorithms and response size
The algorithm number in a DNSKEY record determines key length, signature size and validator support. Choosing it affects how large DNS responses become, which matters because oversized UDP responses may be fragmented or truncated and force a retry over TCP.
| Algorithm number | Name | Status | Size impact |
|---|---|---|---|
| 8 | RSA/SHA-256 | Widely supported, still common | Large keys and signatures |
| 13 | ECDSA P-256 with SHA-256 | Recommended default | Small keys and signatures |
| 15 | Ed25519 | Recommended, support growing | Smallest signatures |
| 5 and 7 | RSA/SHA-1 variants | Deprecated, must not be used for signing | Large and weak |
An RSA DNSKEY set during a rollover can exceed 1,232 bytes, the EDNS buffer size widely recommended to avoid fragmentation. The same set with ECDSA keys usually stays well below that limit, which is one practical reason for the shift toward elliptic curve algorithms across top-level domains and large hosting platforms.
Key rollovers and operational risks
Replacing a DNSKEY is called a key rollover, and it is the most failure-prone task in DNSSEC operations. Because resolvers cache DNSKEY sets and DS records according to their time to live (TTL), old and new keys must overlap long enough for every cache to see a consistent chain.
Two methods dominate. The pre-publish method adds the new key to the DNSKEY set before it signs anything, waits at least one TTL, then switches signing. The double-signature method signs with both keys at once, which is simpler but enlarges responses. KSK rollovers add a parent step: the new DS must be published and the parent’s DS TTL must expire before the old key is withdrawn. The CDS and CDNSKEY records defined in RFC 7344 and RFC 8078 let a child signal the new key to a parent that supports automated updates.
| Symptom | Likely cause | Fix |
|---|---|---|
| SERVFAIL on validating resolvers | DS points to a removed DNSKEY | Restore the key or update the DS |
| Validation failures after rollover | Old key removed before TTL expired | Respect cache timers before removal |
| Signatures fail to verify | Expired RRSIG over the DNSKEY set | Re-sign and monitor expiry dates |
| Truncated responses | Oversized DNSKEY set with RSA keys | Move to ECDSA or reduce published keys |
A broken DNSKEY chain does not degrade gracefully. Validating resolvers return SERVFAIL for the entire zone, so users of large public resolvers simply cannot reach the domain while non-validating resolvers keep working, which often confuses troubleshooting.
In simple terms
A DNSKEY record is like a public seal pattern that a domain hangs on its front door. Every answer the domain gives carries a matching stamp. Anyone can compare the stamp with the pattern. If they match, the answer is genuine and unchanged.
The parent domain, such as the registry for .org, vouches for that pattern. It keeps a fingerprint of it. This chain of vouching runs up to the root of the Internet. As a result, a forged answer fails the comparison and is rejected.
A practical example
A regional bank enables DNSSEC for its online banking domain at its DNS hosting provider. The provider generates a single ECDSA P-256 combined signing key, publishes it as a DNSKEY record with flags 257 and a TTL of 3,600 seconds, and signs the zone. The bank’s administrator then submits the matching DS record through the registrar, which forwards it to the registry of the top-level domain.
Within a few hours, validating resolvers at large internet providers begin checking the bank’s answers. Months later, an attacker on a public Wi-Fi network attempts to inject a forged A record that points the banking domain to a phishing server. The forged record carries no valid RRSIG from the published key, so the customer’s validating resolver discards it and the spoofing attempt fails silently.
When the provider later rolls the key, it publishes the new DNSKEY first, uses CDS signaling to update the parent, and removes the old key only after the DS TTL has expired, so customers see no outage.