Skip to content
dnscheck.app

Glossary

DS Record: What It Is and How It Works in DNSSEC

What a DS record is

A DS record is a DNSSEC record in a parent zone that holds a hash of a DNSKEY from the child zone. A zone is a part of the DNS managed as one unit. It links the two zones, so a resolver (the server that looks up answers for clients) can extend the chain of trust from parent to child. The DNSKEY is the public key published in the child zone. The DS is only a hash of it, not a copy. A signed zone whose parent has no DS for its DNSKEY has no chain from the parent. This is called an island of security.

How a DS record gets to the parent zone and what happens when it is wrong

Your DNS host signs the zone and publishes the DNSKEY. The DS belongs in the parent zone, so you normally submit it at your registrar. Cloudflare's documentation says it generates the DS record when DNSSEC is enabled. It adds the DS automatically only for Cloudflare Registrar and the .ch and .cz TLDs. With Cloudflare Registrar, submission uses CDS/CDNSKEY scanning, can take one to two days, and cannot be controlled manually.

If a referral includes neither a DS nor proof that no DS exists, a validating resolver must ask the parent's nameservers for the DS. It then finds the matching DNSKEY and checks that this key signed the DNSKEY RRset. If the hash values do not match, it returns SERVFAIL. This often follows a provider change that leaves the old DS at the registrar. A bogus result may indicate an attack, but it may also be a configuration error or data corruption. Compare the registrar's DS with what your DNS host publishes first.

Example DS record, its fields, and how to check it

Illustrative record (the digest is a placeholder):

example.com. 3600 IN DS 12345 13 2 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
  • Key tag: 12345. It only narrows the candidate keys and is not a unique identifier.
  • Algorithm: 13. This is Cloudflare's preferred algorithm, which a registrar may list as ECDSA Curve P-256 with SHA-256.
  • Digest type: 2, the hash method used.
  • Digest: the hash of the DNSKEY.

Registrars ask for these four values.

dig +dnssec example.com DS

The answer should contain the DS record and an RRSIG covering it. A set ad flag means the resolver validated the answer. Trust that flag only if you trust that resolver and the path to it. An unset flag is ambiguous: validation may not have been attempted, or it may have failed.

dig +dnssec example.com A
dig +cd +dnssec example.com A

With +cd, a response is sent whether or not validation succeeded. If +cd returns a proper answer but the normal query returns SERVFAIL, the pattern points to a DNSSEC misconfiguration, usually a DS that does not match the zone's keys. A forged response can produce the same result, so this alone is not proof of a configuration error. Use the DNSSEC checker to check your DNSSEC chain and DS record, NS lookup to look up your domain's nameservers, and domain health to run a full domain health check.

Safe order when leaving a signing provider

  1. Note the current DS and nameservers.
  2. Remove the DS at the registrar.
  3. Keep signing on until the old DS TTL has expired at the parent. Cloudflare's guidance is to wait at least 1.5 times the DS TTL before removing DNSKEY records, because removing them while DNSSEC is still enabled breaks resolution.
  4. Only then change nameservers or remove the DNSKEY.

Wrong order: changing nameservers or removing the DNSKEY while the old DS remains. Cached DS records then do not match the new keys, and validating resolvers return SERVFAIL until they expire.

References