DNSSEC Setup Guide
Turn DNSSEC on without taking your domain offline: sign the zone at your DNS host, publish the DS record at your registrar, verify the chain with dig and delv, and change providers or switch it off safely later.
Quick Overview
Before You Start
Enabling DNSSEC takes two changes, always in this order: first your DNS host signs the zone, then your registrar publishes a DS record for it in the parent zone (.com, .nl, .ai and so on). The DS record is what tells validating resolvers to expect signatures. Publish it before the zone is signed, or leave an outdated one behind after a change, and every validating resolver answers SERVFAIL for your whole domain: website, mail and API at once.
This guide is the procedure. For what DNSSEC protects against and how the chain of trust works, read What is DNSSEC and why does it matter? first.
Three checks take a minute and prevent most failed rollouts:
1. Find your DNS host. The name servers in the delegation belong to the operator that has to sign the zone. That is often not the company where you registered the domain. 2. Confirm there is no DS record yet. No answer means you start clean. An existing DS record is either a working setup or a leftover from a previous provider, and you need to know which before changing anything. 3. Confirm the TLD is signed and your registrar takes DNSSEC input. Almost every TLD is signed, .ai included. Registrar control panels differ: most accept a DS record, some ask for the DNSKEY and compute the DS themselves, and a few have no DNSSEC form at all.
# 1. Which name servers answer for the zone?
$ dig NS example.com +short
ns1.dnshost.example.
ns2.dnshost.example.
# 2. Does the parent zone already publish a DS record? (no output = no)
$ dig DS example.com +short
# 3. Is the TLD signed? (a DS answer from the root zone = yes)
$ dig DS com. +short
19718 13 2 8ACBB0CD28F41250A80A491389424D341522D946B0DA0C0291F2D3D7 71D7805AStep 1: Sign the Zone at Your DNS Host
On a managed DNS service this is a single switch. Turning it on generates the keys, signs every record set, and shows the DS record you need in step 2. Nothing changes for resolvers yet: until the parent publishes a DS record, validators treat the zone as unsigned.
• Cloudflare: DNS → Settings → Enable DNSSEC. Cloudflare signs with algorithm 13 and then shows the DS record and the DNSKEY. • Amazon Route 53: hosted zone → DNSSEC signing → Enable. The key-signing key is backed by a customer managed KMS key, which must be asymmetric, of type ECC_NIST_P256, and created in us-east-1. • Google Cloud DNS: zone details → DNSSEC → On. • BIND 9.16 or later: add dnssec-policy default; to the zone. BIND generates an ECDSA P-256 key and keeps the signatures fresh itself. Check the BIND reference manual for your version on whether the zone also needs inline-signing yes;. • PowerDNS: pdnsutil secure-zone example.com, then pdnsutil show-zone example.com prints the DS records.
Before you go on, ask one of your own name servers directly whether the zone is signed:
$ dig DNSKEY example.com +multi @ns1.dnshost.example
example.com. 3600 IN DNSKEY 256 3 13 ( ... ) ; ZSK; alg = ECDSAP256SHA256 ; key id = 34505
example.com. 3600 IN DNSKEY 257 3 13 ( ... ) ; KSK; alg = ECDSAP256SHA256 ; key id = 2371Flags 257 marks the key-signing key (KSK): the DS record in step 2 has to describe this key. Flags 256 is the zone-signing key. Some signers use one combined key, in which case you only see a 257 key.
Step 2: Read the DS Record
The DS (Delegation Signer) record is a hash of your key-signing key. Your DNS host shows it once signing is on, either as one line or as four separate fields. Every field has to reach the registrar unchanged:
| Field | Example | Meaning |
|---|---|---|
| Key tag | 2371 | A 16-bit number computed from the key-signing key. It must equal the key id of a 257 DNSKEY in your zone. |
| Algorithm | 13 | The algorithm of that key. 13 = ECDSA P-256 with SHA-256 (recommended), 8 = RSA/SHA-256, 15 = Ed25519. Do not use 5 or 7 (RSA/SHA-1) for new keys. |
| Digest type | 2 | The hash used to build this DS. 2 = SHA-256 (use this), 4 = SHA-384, 1 = SHA-1 (do not create new ones). |
| Digest | E06D44B8…F8EC8D | The hash itself in hexadecimal. Copy it exactly; spaces that dig prints inside it are not part of the value. |
# The DS record in zone-file form
example.com. 3600 IN DS 2371 13 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
# The same record split into the fields a registrar form asks for
Key tag: 2371
Algorithm: 13 (ECDSAP256SHA256)
Digest type: 2 (SHA-256)
Digest: E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8DChoose algorithm 13 with digest type 2 when you have the choice. RFC 8624 requires validating resolvers to support both, ECDSA keeps responses small, and SHA-1 digests (type 1) must no longer be generated for new DS records.
Some registrars ask for the DNSKEY instead of the DS (flags 257, protocol 3, algorithm, public key) and compute the DS themselves. Give them the 257 key-signing key, never the 256 zone-signing key.
Step 3: Publish the DS at Your Registrar
Log in where the domain is registered, not where DNS is hosted, unless one company does both (then this step is often automatic). Open the domain's DNSSEC or DS section, add one DS record with the four values from step 2, and save. The registrar passes it to the registry, which publishes it in the TLD zone.
• Add one DS per key-signing key. Leave optional fields such as a public key empty unless the form requires them. • Remove DS records that belong to a previous provider or a retired key. A stale DS is the first thing to rule out when validation fails later. • If your DNS host publishes CDS and CDNSKEY records (RFC 7344, RFC 8078) and your registry scans for them, the DS can be created and updated automatically. Check that your registry actually does this before relying on it.
Then query a server of the TLD itself, which shows what the parent publishes without any resolver cache in between:
# For .com and .net; for other TLDs pick a server from: dig NS <tld>. +short
$ dig DS example.com @a.gtld-servers.net +norec +noall +answer
example.com. 86400 IN DS 2371 13 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC6834 57104237C7F8EC8DThe TTL on that answer is how long resolvers may keep an older answer. For .com it is 86400 seconds, so any change to the DS can take up to a day to reach every resolver.
Step 4: Verify the Chain of Trust
Once the parent serves the DS, test through a validating resolver. Cloudflare (1.1.1.1), Google Public DNS (8.8.8.8) and Quad9 (9.9.9.9) all validate DNSSEC. Read the output in this order:
1. The ad flag. In the header, flags: qr rd ra ad means the resolver validated the answer. A normal answer without ad means the zone is still treated as unsigned, usually because the DS is not visible yet. 2. The RRSIG. dig +dnssec shows a signature next to each record set. The two 14-digit numbers are the expiry and inception times (YYYYMMDDHHMMSS, UTC), followed by the key tag of the key that signed it. 3. Matching key tags. The key tag in the DS (2371 here) must equal the key id of the 257 DNSKEY from step 1. Signatures on ordinary records carry the zone-signing key's id instead. 4. An independent validator. delv, which ships with BIND, validates locally from the root trust anchor and prints fully validated when the whole chain holds.
The free DNSSEC Checker runs these checks for you and reports whether the zone is secure, insecure or bogus, with the algorithm, the DNSKEY and DS summary and the RRSIG status.
$ dig +dnssec A example.com @1.1.1.1
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41022
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
example.com. 300 IN A 192.0.2.10
example.com. 300 IN RRSIG A 13 2 300 20261113120000 20261030120000 34505 example.com. 4Hq/vc8t...
$ dig DS example.com +short @1.1.1.1
2371 13 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237 C7F8EC8D
$ delv example.com A
; fully validated
example.com. 300 IN A 192.0.2.10Repeat the query against 1.1.1.1, 8.8.8.8 and 9.9.9.9. If only one resolver disagrees, you are usually looking at a cached answer from before the DS changed, not at a broken chain.
Key Rollovers
A zone-signing key (ZSK) rollover happens entirely inside your zone, and managed providers do it without you noticing. A key-signing key (KSK) rollover changes the key the DS points at, so the registrar is involved again unless CDS/CDNSKEY automation is in place.
For a manual KSK rollover, keep both keys trusted while the parent switches over:
1. Add the new KSK to the zone and wait at least one DNSKEY TTL so resolvers have seen both keys. 2. Publish the DS for the new key at the registrar, next to the existing DS. 3. Wait one DS TTL plus a margin, then confirm both DS records with dig DS example.com +short. 4. Remove the old DS, wait one more DS TTL, and only then remove the old KSK from the zone.
Changing algorithm, for example from 8 to 13, is a different and stricter procedure (RFC 6781) that your DNS host must support.
Disabling and re-enabling DNSSEC at a managed provider is not a rollover. It usually generates a new key, and the DS at your registrar stops matching as soon as the new key goes live.
Moving to Another DNS Provider
Changing DNS hosts is where most DNSSEC outages happen. The new provider signs with its own keys while the parent still publishes the DS for the old provider's key, so validating resolvers reject every answer as bogus. There are two safe ways to move.
Option A: go unsigned during the move. Works with every provider. 1. Remove the DS record at the registrar. 2. Wait until the TLD no longer serves it, then one more DS TTL for cached copies to expire. 3. Switch the name servers to the new provider and wait for the NS TTL at the parent (two days for .com). 4. Enable signing at the new provider and publish its DS record, as in steps 1 to 4 above.
Option B: multi-signer, no unsigned window. Both providers publish each other's DNSKEY records and both DS records sit at the parent during the switch (RFC 8901). This only works if both providers let you import an external DNSKEY; many managed services do not.
During option A the domain is unsigned but fully reachable. That is the safe failure mode: an unsigned zone resolves, a zone with the wrong DS does not.
# Option A, step 2: wait until this returns nothing
$ dig DS example.com @a.gtld-servers.net +norec +short
# Option A, step 3: the delegation the parent hands out, with its TTL
$ dig NS example.com @a.gtld-servers.net +norec +noall +authority
example.com. 172800 IN NS ns1.newhost.example.Turning DNSSEC Off Safely
Switching DNSSEC off is the same move in reverse, and the order is just as strict: the DS goes first, the signatures last.
1. Delete the DS record at the registrar. 2. Confirm the TLD no longer serves it (dig DS example.com at a TLD server returns nothing). 3. Wait at least one DS TTL beyond that moment. 4. Only then turn off signing at your DNS host.
If you stop signing first, the parent keeps vouching for a key that no longer signs anything, and validating resolvers return SERVFAIL until the DS is removed and its TTL has expired. Some providers keep signing in a pending state until they see the DS disappear; others stop at once.
Common Failure Modes
Nearly every DNSSEC outage looks the same from outside: validating resolvers return SERVFAIL while the zone looks fine at its own name servers. The quickest test is to repeat the query with checking disabled. If the +cd query returns the record and the normal query does not, DNSSEC validation is the cause.
| Symptom | Likely cause | How to confirm | Fix |
|---|---|---|---|
| SERVFAIL everywhere, answer with +cd | DS does not match any DNSKEY (wrong key tag, algorithm or digest) | Compare the DS key tag with the key id of the 257 DNSKEY | Correct the DS at the registrar |
| SERVFAIL right after a DNS host move | The parent still holds the old provider's DS | dig DS at a TLD server shows the old key tag | Replace the DS with the new provider's |
| Worked for weeks, then SERVFAIL | Expired RRSIG: the signer stopped, or the zone was signed once by hand | The expiry date in dig +dnssec SOA is in the past | Re-sign and automate signing |
| Only names that do not exist fail | Broken NSEC or NSEC3 denial-of-existence proofs | Query a non-existent name with +dnssec | Fix at the DNS host; see NSEC3 parameters |
| Checker reports insecure, no SERVFAIL | Zone is signed but no DS at the parent | dig DS returns nothing | Publish the DS (step 3) |
| Registrar rejects the DS | Unsupported algorithm, or a DNSKEY entered where a DS is expected | Check the algorithms the registrar accepts | Use algorithm 13 with digest type 2 |
$ dig A example.com @1.1.1.1 | grep status
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 41522
$ dig +cd A example.com @1.1.1.1 | grep status
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33806A wrong DS record does not degrade gracefully. Everyone behind a validating resolver loses the domain at once, until the DS is corrected and the old one has expired from caches.
Verify and Next Step
Check the finished setup with the free DNSSEC Checker, and run it again after every DNS host change, registrar transfer or key rollover, because those are the moments when DS and DNSKEY drift apart.
For background, read What is DNSSEC and why does it matter?. A signed zone is also the prerequisite for DANE, which lets you publish TLSA records for your mail servers (DANE TLSA checker and generator). MTA-STS protects inbound mail transport without needing DNSSEC and is the next guide.
Common Pitfalls to Avoid
- DS record mismatch
The DS record at your registrar must exactly match the DNSKEY in your zone.
- Key rollover failures
Improper key rotation can break DNSSEC. Follow the pre-publish or double-sign method.
- Expired signatures
RRSIG records have expiry times. Automated signing must keep them fresh.
- Not testing before enabling
Use DNSViz or dig +dnssec to verify the chain before publishing DS records.
Related tools & guides
Frequently asked questions
What is DNSSEC and what does it protect against?
DNSSEC (DNS Security Extensions) adds cryptographic signatures to DNS records, allowing resolvers to verify responses have not been tampered with. It protects against DNS spoofing, cache poisoning, and man-in-the-middle attacks that could redirect visitors to malicious sites.
How do I enable DNSSEC?
Enable DNSSEC in your DNS provider dashboard (Cloudflare, Route 53, etc.), copy the DS record details provided, then add the DS record at your domain registrar. Wait for propagation and verify with tools like IntoDNS.ai or DNSViz.net.