Turning on DNSSEC is a two-step move with one trap: Cloudflare generates the keys and publishes the signed RRsets the moment you toggle it on, but the chain of trust at the TLD does not exist until you paste the DS record at the registrar. Skip that step and DNSSEC is a no-op — there is no chain to validate. Do it in the wrong order on a migration and you SERVFAIL the entire zone for every resolver that does validate (which is most of them now). This runbook is the order, the verification commands, and the rollback path we use when enabling DNSSEC on Cloudflare for a zone in production.
How to verify
Three commands tell you what DNSSEC state the zone is in:
# Cloudflare's view of the zone — keys generated, DS record to publish
curl -sS "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dnssec" \
-H "Authorization: Bearer $CF_TOKEN" \
| jq '.result | {status, key_tag, algorithm, digest, ds}'
# What the TLD has published as DS for the zone
dig +short DS example.com @1.1.1.1
# Whether a validating resolver returns the data with AD flag set
dig +dnssec example.com @1.1.1.1 | grep -E "flags|RRSIG"
The AD flag (Authenticated Data) in the response header is what a validating resolver sets when it has confirmed the chain back to the root. No AD flag = no validation. If the zone is fully set up, every authoritative response carries an RRSIG record alongside the data, and the DS at the TLD matches what Cloudflare lists.
What’s happening
DNSSEC adds digital signatures over every DNS response so a resolver can prove the answer was not tampered with in flight. Without DNSSEC, an attacker that controls a recursive resolver, an upstream router, or a coffee-shop Wi-Fi access point can return any DNS answer they like and the client trusts it. With DNSSEC, the resolver validates a signature chain that starts at the root zone, passes through the TLD, and ends at the zone’s own signing key.
Two key pairs are involved in a typical zone. A Key Signing Key (KSK) signs the Zone Signing Key (ZSK), and the ZSK signs every other RRset (A, MX, TXT, etc.). The KSK is more sensitive because compromising it lets you sign anything for the zone; the ZSK rolls more frequently. The hash of the KSK is what gets published at the parent (the TLD) as a DS record — that’s the bit that makes the chain of trust climb from the root, through .com or .fr, into your zone.
Cloudflare manages both keys for you. You toggle DNSSEC on for the zone, Cloudflare immediately generates a KSK/ZSK pair, signs every RRset, and shows you a DS record block in the dashboard. Until you take that DS record and paste it at the registrar, the parent (TLD) has no DS published — so a validating resolver sees signed answers from Cloudflare with no matching DS at the parent and treats the zone as unsigned (which is fine — validating resolvers accept unsigned zones; what breaks them is a signed zone whose chain points at the wrong key).
The procedure
The order that does not break resolution:
-
Confirm the zone is not already DNSSEC-signed by the previous provider. Run
dig +short DS example.com @1.1.1.1. If you get back DS records, the zone has DNSSEC enabled at the parent and the keys are at the old provider. You cannot just flip to Cloudflare — you would have to either remove the DS first (insecure window) or run multi-signer (covered below). -
Enable DNSSEC on the Cloudflare side. Dashboard: DNS → Settings → “Enable DNSSEC”. Or via API:
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dnssec" \ -H "Authorization: Bearer $CF_TOKEN" \ -H "Content-Type: application/json" \ --data '{"status":"active"}'Cloudflare generates a KSK/ZSK pair and starts signing every RRset. The dashboard now shows you a DS record block — algorithm, key tag, digest type, and the digest itself.
-
Wait for the signed answers to propagate. Cloudflare’s NS publishes RRSIG records alongside every record set. Run
dig +dnssec example.comand confirm you seeRRSIGlines. This step is fast (seconds) because the NS are Cloudflare’s. -
Publish the DS at the registrar. This is the only step the registrar controls. Most registrars expose a “DNSSEC” section with fields for key tag, algorithm, digest type, and digest. Paste in the values from the Cloudflare dashboard. Some registrars want the full DS record string; the Cloudflare dashboard has both formats. The TLD’s zone is updated within minutes for
.com/.net, hours for some ccTLDs. -
Verify the chain is complete. Two checks:
# Cloudflare's records and the parent's DS should align dig +short DS example.com @1.1.1.1 curl -sS "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dnssec" \ -H "Authorization: Bearer $CF_TOKEN" | jq '.result.key_tag, .result.digest' # Validating resolver returns AD flag dig +dnssec example.com @1.1.1.1 | grep "flags: qr rd ra ad"Online validators like
https://dnsviz.net/d/example.com/dnssec/andhttps://dnssec-analyzer.verisignlabs.com/walk the chain and call out broken links. -
For a migration off another DNSSEC-signed provider, use multi-signer or a planned insecure window. The two patterns:
-
Planned insecure window. Disable DNSSEC at the old provider, wait for the DS record at the registrar to be removed and TTL out (the parent zone’s DS TTL is often 1-2 days), then enable on Cloudflare and publish the new DS. The zone is briefly unsigned but still resolves. Schedule this as a maintenance window.
-
Multi-signer DNSSEC. Both providers sign the zone simultaneously, the registrar publishes DS records for both KSKs, and validating resolvers accept either. This avoids the unsigned window but requires both providers to support multi-signer mode and you to coordinate key publication carefully.
-
-
Document the rollback path. If validation breaks after publishing the DS, the recovery is to remove the DS at the registrar. Once the DS is gone and the parent’s cache TTL expires, validating resolvers treat the zone as unsigned and queries succeed again. Disabling DNSSEC at Cloudflare without first removing the DS at the registrar produces the worst state: parent says “this zone is signed with key X”, child says “no it isn’t”, every validating resolver SERVFAILs.
For DNSSEC interactions during a registrar/NS swap, the order matters — see setting up a Cloudflare zone for the full cutover sequence with DNSSEC accounted for. For the record-level details that affect what gets signed, the DNS record cookbook covers each type.
Common pitfalls
- Disabling DNSSEC at Cloudflare while the DS is still at the registrar. The TLD says “signed”, Cloudflare says “unsigned”, every validating resolver SERVFAILs. Order: registrar removes DS → wait for parent TTL → then disable at Cloudflare.
- Migrating NS to Cloudflare with an old DS still at the registrar. Old DS points at old keys; Cloudflare’s KSK does not match. Resolvers SERVFAIL until the DS is removed or updated.
- Stale resolver cache after a key change. Even after a clean DS update, some recursive resolvers cache the old DS or KSK for the parent zone’s TTL. Pages of “SERVFAIL on my home Wi-Fi but fine from the office” point at this — give it the parent’s DS TTL (often 1 day) before declaring failure.
- Registrar locking the DS field once published. Some registrars require unlocking the domain or contacting support to change the DS. Test the update path before committing to a key rollover.
- Trusting the dashboard “active” badge as proof of validation. Cloudflare’s “active” means the zone is signed at Cloudflare’s end. It does not mean the registrar has published the DS. The only way to confirm validation is from a public resolver that returns the
ADflag.
DNSSEC is one of those features that adds zero value 99% of the time and saves you on the 1% where someone is poisoning a resolver upstream of your customers. The operational risk is sequencing — every breakage we have seen on the engagements we run came from an out-of-order DS update. Stack Harbor includes DNSSEC enablement and rollover planning as part of the cloud operating model we run for clients on Cloudflare-fronted zones.