What is DNSSEC? How DS and DNSKEY records build a chain of trust

By TechCompare · Updated · How we check

A domain is signed only when its parent zone holds a DS record that matches one of the domain's DNSKEY records. DNSKEY records alone do nothing, and a DS record that matches no key breaks the domain.

DNSSEC adds signatures to DNS answers, so a resolver can tell a real answer from a forged one. The domain signs its records and publishes its public keys in DNSKEY records. The parent zone, like .com, publishes a DS record with a fingerprint of one of those keys. That link from parent to child is what lets a resolver trust the keys, all the way up to the root.

Topic
DNSSEC
Signed DNS
Category
Record types
What each record does

How this is calculated

Most signed zones use two kinds of key. The key signing key (flags 257) signs only the set of keys. The zone signing key (flags 256) signs everything else. Splitting them lets a zone change its everyday key without asking the parent to change anything.

The DS record at the parent names the key signing key by its key tag, a short number worked out from the key itself (RFC 4034), and adds a hash of it. Digest type 2, SHA-256, is the common one. RFC 9904, the current list of DNSSEC algorithms, says new DS records must not use SHA-1 (type 1). For signing, it recommends algorithm 8 (RSA with SHA-256), 13 (ECDSA P-256 with SHA-256) and 15 (Ed25519). Cloudflare signs with algorithm 13, which keeps keys and signatures small.

A resolver that checks DNSSEC starts from the root's key, which it already trusts, and follows the DS records down. When every signature holds, it sets the AD (authenticated data) flag on the answer. When one fails, it answers SERVFAIL instead of handing out data it can't trust. Cloudflare's and Google's public resolvers both check. DNSSEC doesn't encrypt anything, though. It proves where an answer came from, and anyone on the path can still read it.

The usual way to break DNSSEC is moving a domain to a new DNS host while the old DS record stays at the registrar. The new host signs with different keys, the DS record points at a key nobody publishes anymore, and every checking resolver answers SERVFAIL for the whole domain. Cloudflare's docs say to remove the DS record at the registrar before you change name servers.

Open More records in the DNS Lookup to see a domain's DS and DNSKEY records. The tool works out each key's tag, checks that the DS record points at a key the domain publishes, and says whether the domain is signed, not signed or broken. DS and DNSKEY records only exist at the top of a zone, so look up example.com, not www.example.com.

Verdict

Turn DNSSEC on at your DNS host, then add the DS record it gives you at your registrar. When the two are the same company, that often happens for you. Check that the DS tag matches a published key. Before moving to another DNS host, remove the DS record and wait for its TTL to run out, or the domain goes dark for every resolver that checks.

More DNS scenarios

TXT records
The free text record that holds verification codes, SPF, DKIM keys and DMARC policies.
View details
SPF vs DKIM vs DMARC
SPF checks the sending server, DKIM checks the message, and DMARC ties both to the From address.
View details
MX records
How senders find your mail servers, what the priority number does, and the null MX for domains that take no mail.
View details

Frequently asked questions

Does DNSSEC encrypt DNS?
No. It signs answers so they can't be forged, but anyone between you and the resolver can still read them. DNS over HTTPS and DNS over TLS do the encrypting, between your device and the resolver. The two work together.
Why does my domain have DNSKEY records but no DS?
Your DNS host signs the zone, but the registrar has no DS record for it, so nothing links the keys to the parent zone. Resolvers treat the domain as not signed. Copy the DS record from your DNS host into your registrar's DNSSEC settings.
Why is there no DS record for www?
DS records only sit where one zone hands off to another. A name like www.example.com is usually part of the example.com zone, so the example.com keys sign it and it has no DS or DNSKEY records of its own.