DNS security

What Is DNSSEC? How DNS Signing Works and Why It Matters for Email

DNSSEC adds digital signatures to DNS so a validating resolver can reject forged answers. Learn RRSIG, DNSKEY and DS records, the chain of trust, NSEC and NSEC3, what it means for email and DANE, how to enable it, and the failures that make a domain disappear.

By MailConfig.pro TeamPublished 13 min read

On this page
  1. The problem DNSSEC solves
  2. What DNSSEC does not do
  3. How DNSSEC works
  4. Two kinds of keys
  5. The chain of trust
  6. What a resolver reports
  7. Proving that a name does not exist
  8. Why DNSSEC matters for email
  9. DANE for SMTP needs it
  10. Protection for your other mail records
  11. The honest limits
  12. Choosing an algorithm
  13. How to enable DNSSEC
  14. Key rollovers
  15. Common failures
  16. A safe checklist
  17. Turn it on
  18. Move to another DNS provider
  19. Turn it off
  20. Checking DNSSEC with MailConfig.pro

DNSSEC (DNS Security Extensions) adds digital signatures to DNS records. A resolver that validates those signatures can tell that an answer really came from the domain's zone and was not altered on the way, and it throws away answers that fail the check. Without DNSSEC, DNS answers are plain data that any resolver accepts from whoever replies first. DNSSEC is specified in RFCs 4033, 4034 and 4035, and RFC 9364 (BCP 237) calls it the best current practice for authenticating the origin of DNS data.

The problem DNSSEC solves

Email authentication lives in DNS. Your MX records say where mail goes, and your SPF, DKIM and DMARC records say who may send as you. Every one of these is an ordinary DNS answer, and classic DNS has no way to prove an answer is genuine.

  • Forged answers. An attacker who can inject a reply before the real one arrives can send a resolver the wrong address or the wrong record.
  • Cache poisoning. If the resolver accepts the forged reply, it caches it and hands it to every user until the record expires. One successful forgery then affects many lookups.

For mail, the consequences are concrete. A forged MX answer sends mail to the attacker's server. A forged DKIM key or SPF record can make a spoofed message look authenticated. The DMARC specification (RFC 9989, section 11.3) says that forged DNS responses can make aligned mail appear unaligned or the reverse, and lists DNSSEC among the mitigations because it lets recipients detect and discard forged responses.

What DNSSEC does not do

DNSSEC provides origin authentication, data integrity and authenticated denial of existence. RFC 4033 says that, by deliberate design, it does not provide confidentiality. Queries and answers are still readable by anyone on the path. Encrypting the link between a device and its resolver is the job of DNS over TLS (DoT) and DNS over HTTPS (DoH), which protect privacy but don't prove that an answer is genuine.

How DNSSEC works

A signed zone publishes three kinds of records on top of its normal ones.

Record What it holds
DNSKEY The zone's public keys, published in the zone itself
RRSIG A signature over one set of records (an RRset, such as all the MX records of a name). It names the key it was made with and the dates between which it is valid
DS A hash of one of the zone's keys, published in the parent zone (for example.com, in .com)

Two kinds of keys

Most zones use two keys, a split described in RFC 6781 as purely operational:

  • The zone-signing key (ZSK) signs the zone's records. It is used constantly and is cheap to replace, because replacing it doesn't involve the parent. Its DNSKEY flags value is 256.
  • The key-signing key (KSK) signs only the DNSKEY set. It is used rarely and can be kept more tightly protected. Its flags value is 257 (the "secure entry point" bit is set), and the DS record in the parent points to it.

Some setups use one key for both jobs. Validators treat all DNSKEYs alike, so the split is a management choice.

The chain of trust

A validating resolver doesn't trust a zone's keys just because the zone publishes them. It builds a chain from a key it already trusts:

  1. The resolver is configured with the root zone's trust anchor, which IANA publishes. The root zone has been signed since 2010.
  2. The root zone holds a DS record for each signed top-level domain such as .com. That DS matches a key in .com, and .com's signatures vouch for its own records.
  3. .com holds a DS record for example.com. If the DS hash matches a KSK in example.com's DNSKEY set, and that KSK's signature over the DNSKEY set is valid, the zone's keys are trusted.
  4. The ZSK then signs the records you care about, such as MX and TXT. The resolver checks the RRSIG against the ZSK.

If any link is missing or wrong, the chain breaks. The DS record at the parent is the link that you, as a domain owner, control by hand, and it is where most mistakes happen. The root's own key is changed rarely and publicly: ICANN reports that a new root KSK (key tag 38696) began signing on 11 October 2026, so resolver operators had to make sure their trust anchors included it.

What a resolver reports

RFC 4033 defines four outcomes for validated data:

State Meaning
Secure The resolver has a trust anchor, a complete chain, and every signature verifies. It sets the AD (Authenticated Data) bit in its answer
Insecure A signed parent proves there is no DS record for the child, so the zone is deliberately unsigned. Answers are accepted, without the AD bit
Bogus The data should be signed, but validation fails: a bad or expired signature, a DS that matches no key, an unsupported algorithm
Indeterminate The resolver has no trust anchor for that part of the tree

For a bogus result the resolver returns SERVFAIL (response code 2) instead of the data. Newer resolvers can add an Extended DNS Error (RFC 8914) such as code 6 "DNSSEC Bogus" or code 7 "Signature Expired" to say why.

The difference between insecure and bogus is the one to remember. An unsigned zone with no DS at the parent works everywhere. A zone with a DS but broken signatures fails for every validating resolver.

Proving that a name does not exist

A "no such record" answer needs a signature too, or an attacker could forge it. DNSSEC does this with NSEC records, which sign the gap between two existing names, so "nothing exists between a.example.com and m.example.com" proves that b.example.com doesn't exist. Because NSEC lists the next name, anyone can walk the whole zone (RFC 4033 and RFC 5155 both note this). NSEC3 uses hashed names to make that harder. RFC 9276 advises using NSEC unless you need NSEC3's features, and if you use NSEC3, setting iterations to 0 and an empty salt, because extra iterations add little protection and add resolver work.

Why DNSSEC matters for email

DANE for SMTP needs it

DANE for SMTP (RFC 7672) lets a domain publish TLSA records that say which certificate or key its mail servers use. A sending server that supports DANE then requires TLS with that certificate, with no downgrade to plain text. That only works if the TLSA answer can't be forged, so a sender uses TLSA records only if they validate as secure, and a security-oblivious resolver must not be used. DNSSEC on your zone, and on the zone of your MX host names, is therefore a hard requirement for DANE. This is the main reason email administrators turn it on. MTA-STS aims at similar protection with an HTTPS policy file and public certificate authorities, and needs no DNSSEC. RFC 8461 says this comes at the cost of risking malicious downgrades: MTA-STS is trust-on-first-use, so an attacker who blocks the first policy fetch can still force a downgrade (sections 2 and 10.2). Resistance to that kind of downgrade is a feature of DANE.

DANE support is on the sending side. Microsoft documents that Exchange Online validates DNSSEC and DANE on outbound mail and supports inbound DANE for domains set up with its DNSSEC and MX records. Support varies by provider, so check before you rely on it; many domains publish MTA-STS as well.

Protection for your other mail records

When a receiving server validates DNSSEC, forged MX, SPF, DKIM and DMARC answers for your signed domain fail validation instead of being accepted. RFC 6376 (section 8.5) notes that the DNS is insecure and points to DNSSEC as the work that addresses this for DKIM and everything else that relies on DNS.

The honest limits

  • None of the email standards require it. SPF, DKIM, DMARC and MTA-STS work on unsigned domains, and most receivers' checks don't depend on DNSSEC. For these records, DNSSEC is extra protection, not a prerequisite.
  • It only helps if the other side validates. A resolver that doesn't validate ignores your signatures.
  • It guards DNS answers, not your configuration. A dangling CNAME or a typo in an SPF include is still a correctly signed record. See SPF hijacking.
  • It adds an operational risk. A mistake takes the domain offline for validating resolvers, and mail with it.

Choosing an algorithm

RFC 9904 (which obsoletes RFC 8624 and keeps its recommendations) moves the full list to the IANA registries and recommends three algorithms for signing. RFC 9905 later deprecated the two RSA/SHA-1 algorithms, and the IANA registry now marks them "MUST NOT" for signing, although validators still accept them for now:

Number Name Use for signing
8 RSASHA256 Recommended
13 ECDSAP256SHA256 Recommended
15 ED25519 Recommended
14 ECDSAP384SHA384 May
5 and 7 RSA with SHA-1 Must not (RFC 9905)

For new zones, algorithm 13 is a sensible default. It is on the recommended list, ECDSA P-256 keys and signatures are small, which keeps DNS responses short, and Cloudflare, for one, says it prefers algorithm 13. The RFC doesn't pick a single winner, so the practical test is what your DNS host signs with and what your registrar's DS form accepts. Cloudflare notes that some registrars list algorithm 13 under the name "ECDSA Curve P-256 with SHA-256", and suggests asking your registrar to add support or moving to one that has it. For the DS record, use digest type 2 (SHA-256): RFC 9904 says SHA-1 digests must not be used for delegation.

How to enable DNSSEC

DNSSEC has two halves, and both must be done:

  1. At your DNS host, enable signing for the zone. The host generates the keys, signs the records and shows you a DS record (key tag, algorithm, digest type and digest). Cloudflare and Amazon Route 53 both work this way, though in Route 53 you also create and own the KSK in AWS KMS.
  2. At your registrar, publish that DS record. This is what links your zone to the parent. Registrars differ in whether they ask for the DS values or for the DNSKEY. Cloudflare adds the DS automatically for domains registered with it.

Don't publish the DS until the zone is signed and serving its DNSKEY records, or validators will treat the zone as bogus. Then check the result with the free DNSSEC checker.

Before you start, confirm that your TLD supports DNSSEC. Use a single DNS provider for all of your name servers: Route 53 states that multi-vendor configurations are not supported when its DNSSEC signing is on.

Key rollovers

Keys are replaced from time to time, and signatures expire and must be refreshed. A managed DNS host does this for you, which is the best reason to use one. Rolling a ZSK doesn't touch the parent. Rolling a KSK does, because the DS must change, and the old and new data must overlap for at least the TTL of the records involved (RFC 7583 gives the formulas). Changing algorithm is the riskiest kind of rollover. Do it only with the steps from your DNS host.

Common failures

Nearly every outage is one of these:

  • DS mismatch after a provider change. You move your DNS to a new host, which generates new keys, but the registrar still publishes the old DS. Every validating resolver now returns SERVFAIL.
  • Expired signatures. Signing stopped, for example because a signer broke or an operator left the zone unmanaged, and the RRSIGs reached their expiry date.
  • A broken rollover. The new key was published or the old one was removed too early, before the parent or caches had caught up.
  • A parent that can't serve DS records. Route 53's guide also warns that a parent zone on a DNS provider that doesn't answer DS queries correctly makes the child unresolvable.

The failure is often invisible to you. Resolvers that don't validate keep working, so the site loads and mail goes out from your office while a share of the world gets SERVFAIL. When your domain is bogus, a sender whose resolver validates can't even look up your MX records, so mail to you is typically queued and retried, and may eventually bounce.

A safe checklist

Turn it on

  1. Enable DNSSEC at your DNS host and wait until it reports the zone as signed.
  2. Copy the DS values exactly (key tag, algorithm, digest type, digest) into your registrar.
  3. Test with the DNSSEC checker and look up a few of your records with the DNS lookup tool. Check again after the DS TTL has passed.

Move to another DNS provider

RFC 6781 and Cloudflare's migration guide describe the same safe order when the old and new hosts can't both sign:

  1. Remove the DS record at the registrar.
  2. Confirm the parent no longer serves the DS: query a parent name server directly, for example dig DS example.com @<a .com name server>. Registrars and registries can take hours to publish a removal, so don't trust the registrar's screen alone.
  3. Only then wait for the DS TTL to expire. Cloudflare says this commonly takes 24 to 48 hours. RFC 7583 defines the wait as the parent's propagation delay plus the DS TTL.
  4. Switch the name servers, and wait for the old NS TTL to expire.
  5. Enable DNSSEC at the new host and publish the new DS.

Changing name servers too early means validating resolvers return SERVFAIL. The same CDS/CDNSKEY and TLSA cautions as in "Turn it off" apply. Some providers support a multi-signer setup that avoids the gap, but it needs both to support it.

Turn it off

  1. Remove the DS record at the registrar. If a CDS or CDNSKEY record is published, remove that too: some registries and registrars scan for those records and can add the DS back. (Cloudflare describes this scanning for its registrar and some country domains.)
  2. Confirm the parent no longer serves the DS, then wait until its TTL has expired.
  3. Only then stop signing at the DNS host. Cloudflare's rollback guidance is to keep signing on until the DS TTL has expired.

Doing it in the reverse order leaves the zone bogus until caches clear. If you publish TLSA records for DANE, plan their removal first: RFC 7672 lists disabled DNSSEC among the misconfigurations that make senders delay mail, which may then bounce.

Checking DNSSEC with MailConfig.pro

The free DNSSEC checker looks at the zone that encloses a domain (a subdomain is checked at its parent zone), finds the DS records at the parent's name servers and computes the DS digest from each DNSKEY to see whether it matches. It lists the keys and signature validity periods and flags expired or soon-to-expire ones, shows whether NSEC or NSEC3 is used and warns about NSEC3 iterations above zero, and flags legacy algorithms and SHA-1 DS digests. It also asks the 1.1.1.1 validating resolver whether it returns authenticated data, and reports a secure, insecure, bogus or indeterminate result.

The checker verifies signature presence and validity periods but does not verify the signatures cryptographically, so a "secure" result also depends on the AD bit from 1.1.1.1. Use the MX lookup and SMTP checker tools to inspect the mail side of the domain.

Frequently asked questions

What is DNSSEC in simple terms?

DNSSEC (DNS Security Extensions) adds digital signatures to DNS records. A resolver that validates them can tell whether an answer really came from the domain's zone and was not changed on the way, and it discards forged answers instead of passing them on.

Does DNSSEC encrypt DNS queries?

No. RFC 4033 states that DNSSEC does not provide confidentiality. Anyone on the path can still read the queries and answers. Encrypting the connection between a device and its resolver is a different job, done by DNS over TLS (DoT) or DNS over HTTPS (DoH). The two are complementary.

Do I need DNSSEC for email to work?

No. SPF, DKIM, DMARC and MTA-STS all work without it, and an unsigned domain sends and receives mail normally. DNSSEC is required only for DANE for SMTP (RFC 7672), and it protects your mail DNS records from forgery for senders that validate.

What happens if my DNSSEC breaks?

A validating resolver treats the answer as bogus and returns SERVFAIL, so the domain stops resolving for everyone behind that resolver. Resolvers that don't validate still work, which is why a broken setup can look fine from your own network. The usual causes are a DS record that doesn't match your keys, expired signatures and a half-finished key rollover.

Which DNSSEC algorithm should I use?

Algorithm 13 (ECDSA P-256 with SHA-256) is a safe default: RFC 9904 recommends it for signing and validation, and hosts such as Cloudflare prefer it. Algorithm 15 (Ed25519) is also recommended, and RSA with SHA-256 (algorithm 8) is still acceptable. Algorithms 5 and 7 (RSA with SHA-1) must not be used for signing (RFC 9905). Pick one your DNS host and your registrar both support.

How do I turn DNSSEC off safely?

Remove the DS record at your registrar first, wait until its TTL has expired at the parent so no resolver still expects signatures, and only then stop signing at your DNS host. Disabling signing while the DS is still published makes the zone bogus.

References

dnssecdnsdanetlsachain of trust

DNS security

What Is MTA-STS? SMTP Strict Transport Security Explained

MTA-STS lets a domain require encrypted, certificate-checked delivery of incoming mail. Learn the TXT record and policy file, the testing and enforce modes, how senders cache policies, TLS-RPT reports, DANE, and a safe deployment and removal plan.

· 8 min read

DMARC

What Is DMARC? How Email Authentication Fits Together

DMARC is a DNS record that ties SPF and DKIM to the domain in the visible From address, states what receivers should do with mail that fails, and requests reports. This guide covers alignment, the record syntax, policies, reporting and what happens when a domain has no record.

· 10 min read

DNS security

SPF Hijacking: How Dangling CNAMEs and Typos Let Spoofing Pass DMARC

Some spoofed mail passes DMARC because attackers took over a name your DNS still trusts: a CNAME to an expired domain, a mistyped include, or a CIDR typo. How the takeover works, how to spot it in DNS and in DMARC aggregate reports, and how to close it.

· 8 min read

DKIM

What Is DKIM? DomainKeys Identified Mail Explained

DKIM adds a cryptographic signature to every message, and receivers verify it with a public key in your DNS. This guide covers the DKIM-Signature header, selectors and key records, key sizes and Ed25519, key rotation, forwarding and mailing lists, and how DKIM alignment makes DMARC work.

· 6 min read