Registrar Domains.

DNS & security

DNSSEC explained: DS records, chain of trust, removal

Last reviewed:

DNSSEC stands for Domain Name System Security Extensions. It adds signatures to DNS data, so a resolver can check that an answer is the one the zone owner published. This guide covers what DNSSEC protects, what a DS record is, how the chain of trust works, and how to turn it off safely.RFC 9364 is the current overview of the DNSSEC standards.[5]

What DNSSEC protects, and what it does not

A resolver is the server that answers DNS questions for your computer or phone.DNSSEC gives a resolver two proofs: that DNS data came from the zone owner, and that nobody changed it on the way.[1]A resolver that validates can detect a forged or changed answer and refuse it.[1]DNSSEC adds four record types (RRSIG, DNSKEY, DS and NSEC) and two header bits (AD and CD).[1]A resolver asks for the signatures with the DNSSEC OK (DO) bit of EDNS, an extension to the DNS message format.[1]

DNSSEC does not encrypt queries or answers, so it does not make them private.[1]It gives no protection against denial of service.[1]It also proves only that the data came from whoever holds the keys. If an attacker signs in to your registrar account and changes the records, the signatures stay valid. If an attacker copies the zone signing key, the forged records carry a valid signature too. DNSSEC cannot help in either case.

DS record vs DNSKEY record

A DNSKEY record holds a public key of the zone.[2]An RRSIG record holds the signature over one set of records, for example all the A records of a name.[2]A resolver uses the key in the DNSKEY to check the signature in the RRSIG.

DS stands for Delegation Signer.A DS record points to one DNSKEY by its key tag, its algorithm and a digest (a hash) of the key.[2]The DS and its DNSKEY share an owner name but live in different zones: the DS for example.com is in the com zone, the DNSKEY in the example.com zone.[2]This is why the DS is the one piece of DNSSEC your registrar handles. The registrar passes it to the registry, which puts it in the parent zone.

Most signed zones use two kinds of key. KSK stands for key signing key. ZSK stands for zone signing key.The KSK signs the other keys and the ZSK signs the zone data; validation makes no difference between them.[1]

The chain of trust from the root

A resolver follows an authentication chain: alternating DS and DNSKEY record sets, where each link vouches for the next.[1]For example.com: the root DNSKEY signs the DS for com, the com DNSKEY signs the DS for example.com, and the example.com DNSKEY signs the A record.

A chain needs a start, called a trust anchor.A trust anchor is a DNSKEY, or the DS hash of one, that a resolver is configured with and gets from outside the DNS.[1]A validating resolver must be configured with at least one trust anchor.[3]In practice that anchor is the key of the DNS root zone.IANA publishes the current and past trust anchors of the root zone.[6]ICANN manages the root zone KSK and runs its rollovers; resolver operators must keep the current root KSK in their configuration.[7]

When a child zone is signed, a DS record set should be present at the delegation point in the parent.[3]The parent cannot build that DS alone: it needs the child's DNSKEY, so child and parent must communicate.[3]For a domain, that communication runs through the registrar.A broken link in the chain makes the data Bogus, and a Bogus domain can become invisible to validating clients.[4]The common cause is a DS at the parent that points to a key the zone no longer publishes.

Registrar or DNS host: who does what

Two parties take part. The DNS host runs the nameservers for your zone. It makes the keys, signs the records, and publishes the DNSKEY and RRSIG records. The registrar holds the domain at the registry. It is the only party that can send a DS record to the parent zone.

When the registrar also hosts your DNS, one company does both jobs. When another company hosts your DNS, you have two steps. First turn DNSSEC on at the DNS host. Then give its DS record to the registrar. The order matters: a DS with no matching DNSKEY breaks the chain.

How to turn DNSSEC off before you change DNS host

A change of DNS host replaces the keys, because the new host has its own. An old DS at the parent next to the new host's zone breaks the chain.When the two hosts do not cooperate, the zone must go insecure for the duration of the change: the registry removes the DS, the nameservers change, and the registry adds the new host's DS only after that.[4]The order, in four steps:

  1. Turn DNSSEC off. Do this at your current DNS host, or on the domain page when the registrar's nameservers are in use.
  2. Wait until public DNS shows no DS record. The registry can take up to a day. Check with dig DS example.com.
  3. Change the nameservers to the new host.
  4. Turn DNSSEC on at the new host, only after the move. The new host publishes its own DS.

Step 2 is the one people skip. If the nameservers change before the old DS is gone, validating resolvers mark the domain Bogus. The wait costs a day. The outage costs more.

How to check DNSSEC

The dig command ships with most Unix systems. Ask for an A record with the DO bit set:

dig +dnssec example.com A

A signed zone returns an RRSIG record next to the A record. Then look at the flags line.A recursive name server sets the AD (Authenticated Data) flag only when it considers every record in the answer authentic.[3]An ad in the flags line means your resolver validated the answer. No ad means the resolver did not validate, or could not. To see if the chain starts at all, ask the parent for the DS record:

dig DS example.com

An empty answer means the parent has no DS, so the domain is not signed at the parent. A DS means the parent vouches for a key that must exist in the zone. For a picture of the whole chain, use DNSViz. It draws every link from the root to the name and marks the broken ones.

DNSSEC on Registrar Domains

The domain page shows one value for DNSSEC: On, Off, or a dash when the state is unknown. The dashboard does not show DS records and cannot add or edit them. The default nameservers are the registrar's, and the registrar's DNS holds the keys there; the service itself does not sign zones. A move to Cloudflare is optional.

The one DNSSEC change the service makes is to turn DNSSEC off. It exists to clear the way for a move to Cloudflare. A DS record left in public DNS next to Cloudflare's unsigned zone breaks the domain for validating resolvers. On the domain page the change applies at once, and the account email gets a notice. Through the API and the MCP tool turn_off_dnssec, the request waits until the owner confirms it from an email.

The service cannot turn DNSSEC on. Turn it on at your DNS host, for example in Cloudflare after the move. The host then publishes its own DS. When the domain's DNS is hosted elsewhere, the registrar cannot turn DNSSEC off. Turn it off at that DNS host.

Before a move, "Check again" reads two facts: the registrar's DNSSEC setting, and whether public DNS still shows a DS record. The second fact is read over DNS-over-HTTPS. The move waits until the setting is off and no DS shows. The registry removes the DS, which can take up to a day. A DS that public DNS still shows 48 hours after the move is flagged.

Two read-only tools report the state: get_domain reports dnssec, and get_cloudflare_status reports dnssec.publicDs. The tool use_cloudflare is refused while DNSSEC is on. See the tool list and Manage a domain in the docs, and the glossary entries for DNSSEC and DS record.

Sources

  1. RFC 4033: DNS Security Introduction and Requirements, RFC Editor (IETF), accessed
  2. RFC 4034: Resource Records for the DNS Security Extensions, RFC Editor (IETF), accessed
  3. RFC 4035: Protocol Modifications for the DNS Security Extensions, RFC Editor (IETF), accessed
  4. RFC 6781: DNSSEC Operational Practices, Version 2, RFC Editor (IETF), accessed
  5. RFC 9364 (BCP 237): DNS Security Extensions (DNSSEC), RFC Editor (IETF), accessed
  6. DNSSEC Trust Anchors and Rollovers (root zone), IANA, accessed
  7. Root Zone KSK Rollover, ICANN, accessed