Join our Newsletter — 33% off our NHI Course
Home› Guides› DANE and TLSA Records: Pinning TLS Trust in…
Guide Email & Communications Security

DANE and TLSA Records: Pinning TLS Trust in DNSSEC

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 15 min read
On this page

A TLSA record tells every DANE-aware sender exactly which key your mail server must present, and if that record and the live certificate ever disagree, those senders stop delivering to you. DANE (DNS-Based Authentication of Named Entities) turns opportunistic SMTP encryption into authenticated, downgrade-resistant TLS, but it moves the trust decision into your DNS zone and makes key rotation a coordinated DNS and server change. This guide explains the TLSA record field by field, why "3 1 1" is the normal choice for SMTP, how senders behave when records are missing, unusable or broken, and how to roll keys without queuing a day of inbound mail. It is for email and DNS administrators running DNSSEC-signed zones.

Key takeaways

  • DANE replaces "any certificate will do" with a pinned key. A secure TLSA RRset at _25._tcp.<mx-host> obliges DANE-aware senders to use TLS and to authenticate your server against the record, with no fallback to cleartext.
  • Use 3 1 1 unless you have a reason not to. RFC 7672 recommends DANE-EE(3), SPKI(1), SHA2-256(1) first and DANE-TA(2), Cert(0), SHA2-256(1) second; PKIX-TA(0) and PKIX-EE(1) should not be published for SMTP.
  • DNSSEC is a hard dependency, on both sides. Senders only honour TLSA records from DNSSEC-validated answers, and a bogus answer defers your mail rather than downgrading it.
  • Rollover is where outages happen. Publish the next key's TLSA record at least two TTLs before the new certificate goes live, keep "current plus next" records, and change one thing at a time (RFC 7671 Section 8).
  • Monitor from the outside. TLS-RPT (RFC 8460) reports with result types such as tlsa-invalid and dnssec-invalid are the only way you see failures in other organisations' queues.

What DANE does

Port 25 relay uses STARTTLS opportunistically: senders usually accept any certificate, and if the STARTTLS offer is stripped the message goes in cleartext, so an attacker in the path (ATT&CK T1557 Adversary-in-the-Middle) can downgrade or intercept unnoticed. DANE publishes, in a DNSSEC-signed zone, which certificate or key the server will present. The signed answer cannot be forged or hidden, and the sender authenticates the server without relying on a public certificate authority.

The building blocks are four Standards Track RFCs, checked on 27 November 2026: RFC 6698 (August 2012) defines the TLSA record (RR type 52); RFC 7218 (April 2014) adds the field acronyms; RFC 7671 (October 2015) updates RFC 6698 with DANE-EE and DANE-TA semantics and rollover guidance; RFC 7672 (October 2015) defines DANE for SMTP.

Microsoft's documentation states that outbound SMTP DANE is enabled by default for all Exchange Online customers with no tenant opt-out, and that inbound DANE is opt-in per domain. Postfix has supported DANE in its SMTP client since version 2.11. A wrong record therefore hurts.

DANE does not replace SPF, DKIM or DMARC. See the SMTP Security, STARTTLS and MTA-STS Guide for the wider transport picture and the DMARC, SPF and DKIM Guide for sender authentication.

TLSA record anatomy

A TLSA record has four fields: certificate usage, selector, matching type and the certificate association data. In presentation format it looks like this:

_25._tcp.mx1.example.com. 3600 IN TLSA 3 1 1 <64 hex characters: SHA-256 of the server's SubjectPublicKeyInfo>

The owner name is the port, the transport and the host name the client connects to. For SMTP that is the MX host name, not the mail domain: mail for example.com delivered to mx1.example.com is checked against _25._tcp.mx1.example.com.

FieldValueRFC 7218 nameMeaningUse for SMTP
Certificate usage0PKIX-TACA constraint: chain must also validate against public CAsDo not publish (RFC 7672 Section 3.1.3)
Certificate usage1PKIX-EEService certificate constraint plus public CA validationDo not publish
Certificate usage2DANE-TATrust anchor assertion: the named CA or intermediate is the trust anchorSecond choice
Certificate usage3DANE-EEDomain-issued certificate: match the server's own certificate or keyFirst choice
Selector0CertMatch the full certificateWith DANE-TA
Selector1SPKIMatch only the SubjectPublicKeyInfo (public key)With DANE-EE
Matching type0FullExact data, no hashDiscouraged: large records, interoperability problems
Matching type1SHA2-256SHA-256 digestMandatory to implement; publish this
Matching type2SHA2-512SHA-512 digestOptional extra; never publish SHA2-512 only

Why 3 1 1 is the default practice

  • No name or expiry checks: RFC 7671 Section 5.1 says a server matching a DANE-EE record must be considered authenticated even if no name in the certificate matches, and the certificate's expiry date is ignored. The TLSA RRset is the identity. Self-signed certificates work.
  • Survives renewal if the key is kept: because the selector is SPKI, the record still matches after a certificate is renewed with the same key pair. Configuring the ACME client to reuse the key makes most renewals non-events.

When 2 0 1 makes sense

DANE-TA(2) with Cert(0) and SHA2-256(1) pins an issuing CA rather than the server key. It suits large estates where many MX hosts get certificates from one internal or public issuer and the CA changes far less often than server keys. Three conditions apply. The server must send the trust anchor certificate in its TLS handshake (RFC 7671 Section 5.2.2). Name checks do apply: RFC 7672 makes the TLSA base domain, the MX host name, the primary reference identifier, with the original next-hop domain also accepted for MX-derived records. And RFC 7671 Section 5.2.1 advises Cert(0) rather than SPKI(1) for DANE-TA, because pinning only the key would let a subordinate CA issue chains that escape the anchor's constraints.

To produce the 3 1 1 digest, hash the DER-encoded public key with SHA-256, for example openssl x509 -in cert.pem -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256, and check it against the key the server actually presents.

DANE for SMTP

RFC 7672 defines how a sending MTA uses TLSA records. Everything depends on the DNSSEC status of two lookups: the MX lookup for the recipient domain and the TLSA lookup for each MX host.

Situation seen by the senderSender behaviour (RFC 7672)
MX lookup fails (bogus, indeterminate or error)Delivery is delayed
MX answer is insecure (unsigned)DANE cannot authenticate the delivery; the sender may use pre-DANE TLS and must not present it as secure
TLSA lookup for one MX host failsThat host is treated as unreachable and skipped; if no host is reachable, delivery is delayed
Secure TLSA RRset with at least one usable recordTLS and authentication are required; failure moves to the next MX or delays delivery
Secure TLSA RRset with only unusable records (for example only usage 0 or 1)TLS is required but not authenticated
No TLSA record, or insecure TLSA answerFalls back to opportunistic pre-DANE TLS
  • Both zones must be signed: the recipient domain (for a secure MX answer) and the zone holding the MX host's address and TLSA records. Postfix, for example, does not look up TLSA records for MX hosts whose address records sit in an insecure zone. See the DNSSEC Deployment Guide.
  • Any secure TLSA record is a commitment to TLS: RFC 7672 Section 9.2 says servers that offer STARTTLS selectively, for example only after greylisting, must not publish TLSA records.
  • SNI: clients must send SNI with the TLSA base domain; servers may use it to choose a certificate but must not require it, and should present a matching fallback chain when SNI is missing.

MX preference still wins over TLS, so publish TLSA records for every MX host, including backup MX and third-party filtering services.

Sending side configuration

Outbound, a sender needs a DNSSEC-validating resolver and an MTA that honours TLSA records. In Postfix, DANE is off unless smtp_dns_support_level = dnssec is set; smtp_tls_security_level = dane authenticates where usable records exist, and dane-only defers delivery to servers without them. Postfix relies on the system resolver and recommends a local validating resolver on loopback.

Key rollover without outages

The most common DANE outage is a renewal that silently changes the key while the TLSA record still pins the old one. RFC 7671 Section 8 sets the rule that prevents this: a future or past record must never be the only record for a given usage, selector and matching type, and each published combination must on its own match the chain the server presents.

Rollover procedure for 3 1 1

  1. Generate the next key in advance. Create the new key pair (and certificate request) without deploying it. Compute its 3 1 1 digest.
  2. Publish current plus next. Add a second TLSA record for the new key alongside the existing one at each _25._tcp.<mx-host> name. Confirm both records validate as DNSSEC-secure from an external resolver.
  3. Wait at least two TTLs. RFC 7671 Section 8 asks for the new record to be published at least two TTLs before the new chain is deployed, so every cached copy of the RRset includes the new key. Allow for signing and zone transfer delays too.
  4. Deploy the new key and certificate on each MX host, one host at a time if you have several. Test that the presented key matches a published record using an external DANE validation tool.
  5. Check reports in TLS-RPT and inbound logs for a full reporting day.
  6. Remove the old record once nothing presents the old key. Keep a "next" record published for the following rotation if your process allows it.
  • One change at a time: RFC 7671 Section 8.4 warns against combining a key change with a change of TLSA parameters. To move from 2 0 1 to 3 1 1, first publish 3 1 1 for the existing chain, wait, then change keys (Section 8.2).
  • Adding SHA2-512: publish the new digest for every key in use, because clients use only the strongest digest present for each usage and selector (Section 9). A key matched only by the weaker digest will fail for clients that prefer SHA2-512.
  • DANE-TA rollover: publish the new trust anchor's record before using it to issue server certificates (RFC 7672 Section 4).
  • Compromise: revocation is done by removing the compromised key's TLSA record, not by CRL or OCSP. That is why RFC 7671 Section 13 asks for TTLs short enough to limit disruption from unplanned changes, and short DNSSEC signature lifetimes, since a replayed signed record stays valid until its signature expires.

Automating it safely

The renewal pipeline has to own both halves: reuse the key so the 3 1 1 digest does not change, or publish the next TLSA record, wait two TTLs, then install the new key. The DNS API credential that publishes TLSA records is a high-value non-human identity, since whoever holds it can pin your mail to their own key or break inbound delivery: scope it to the TLSA names, vault it and rotate it. See the Certificate Expiry Outages and 47-Day TLS Certificates Guide.

Rolling back

If inbound delivery fails, publish a TLSA record matching the key in service rather than deleting DNSSEC; removing all TLSA records only helps after caches expire, and RFC 7672 treats disabling DANE as a last resort. On Exchange Online, inbound DANE is reversed with Disable-SmtpDaneInbound.

DANE and MTA-STS

MTA-STS (RFC 8461) solves the same downgrade problem with an HTTPS-hosted policy and public CA certificates instead of DNSSEC. The two are designed to coexist, and RFC 8461 Section 2 states that senders must not allow MTA-STS policy validation to override a failing DANE validation. In practice, a broken TLSA record still blocks delivery from DANE-aware senders even if your MTA-STS policy is perfect.

QuestionDANEMTA-STS
Trust rootDNSSEC chain to the DNS rootPublic Web PKI certificate authorities
PrerequisitesSigned recipient zone and MX host zone; validating resolvers at sendersHTTPS host at mta-sts.<domain> with a publicly trusted certificate; MX certificates from public CAs
First contactProtected from the first messageTrust on first use: policy is cached after the first fetch
Main operational riskTLSA and key mismatch on rollover; DNSSEC failuresPolicy host or certificate failures; stale max_age caches
Failure reportingTLS-RPT policy type tlsaTLS-RPT policy type sts

Decision guidance: if your DNS provider supports DNSSEC well and your MX hosts are under your control, publish DANE and MTA-STS together, which covers senders that support only one. If you rely on a hosted mail or filtering service, publish DANE only where the provider supports inbound DANE for your domain, because the TLSA records must match keys the provider controls and rotates. Smaller teams without DNSSEC experience can start with MTA-STS and TLS-RPT, then add DANE once DNSSEC is stable.

Monitoring and measurement

RFC 7672 Section 6 tells administrators to monitor logs and queues, because mandatory DANE delays mail rather than sending it insecurely. Build monitoring on three layers:

  • TLS-RPT: publish _smtp._tls.<domain> TXT "v=TLSRPTv1; rua=mailto:tlsrpt@<domain>" before enabling DANE. Senders post daily JSON reports (normally gzip-compressed) covering a UTC day. The DANE-relevant result types are tlsa-invalid, dnssec-invalid, dane-required, starttls-not-supported and certificate-expired.
  • Synthetic checks: at least daily, and after every certificate or DNS change, compare the key each MX host presents on port 25 with the published TLSA records from an external validating resolver. Alert on any MX host with no matching record, and on RRSIG expiry within your re-signing window.
  • Outbound logs: on your own senders, log TLS verification results per destination. Exchange Online returns NDR codes 4/5.7.321 (starttls-not-supported), 4/5.7.322 (certificate-expired), 4/5.7.323 (tlsa-invalid) and 4/5.7.324 (dnssec-invalid); Microsoft notes some DNSSEC failures surface as 4/5.4.312.

Metrics

  • TLSA coverage: percentage of MX hosts (including backups and filtering services) with a secure, matching TLSA record. Target 100%.
  • Key match rate: share of synthetic checks where the presented key matches a published record. Anything below 100% is an incident.
  • TLS-RPT failure rate: failed sessions as a share of total sessions reported, split by result type; investigate any non-zero tlsa-invalid or dnssec-invalid count.
  • Rollover lead time: hours between publishing the next TLSA record and deploying the key, compared with two times the TLSA TTL.

Framework mapping

FrameworkReferenceHow DANE contributes
NIST CSF 2.0PR.DS-02Protects data in transit between mail servers against interception and downgrade
NIST SP 800-53 Rev 5SC-8 Transmission Confidentiality and IntegrityAuthenticated TLS on server-to-server mail
NIST SP 800-53 Rev 5SC-20 and SC-21 Secure Name/Address ResolutionSigned authoritative data and validating resolvers that DANE depends on
NIST SP 800-53 Rev 5SC-17 Public Key Infrastructure CertificatesManaging the keys and certificates pinned by TLSA records
MITRE ATT&CK v20T1557 Adversary-in-the-Middle; T1040 Network SniffingTechniques that opportunistic SMTP TLS does not stop and DANE mitigates

Common failure patterns

  • Renewal changes the key, TLSA does not follow: the classic outage. Automated renewal generates a new key by default and DANE-aware senders start deferring. Reuse keys or make the renewal pipeline publish the next record first.
  • Next key published too late: the new record goes up minutes before the swap while resolvers still cache the old RRset.
  • Backup MX or filtering service forgotten: TLSA records on the primary MX only, or records that pin your key while a third-party gateway presents its own.
  • DNSSEC breaks underneath DANE: expired RRSIGs or a DS mismatch after a registrar or DNS provider change turn into dnssec-invalid and delayed mail for every DANE-aware sender. See DNSSEC Validation Failures.
  • Publishing usage 0 or 1: senders treat PKIX-TA and PKIX-EE as unusable for SMTP, so the domain gets mandatory but unauthenticated TLS and a false sense of protection.

Practitioner checklist

  • Confirm the recipient domain and every MX host zone are DNSSEC-signed and validate from external resolvers.
  • Publish TLS-RPT and collect at least a week of reports before adding TLSA records.
  • Publish 3 1 1 records (or 2 0 1 with the anchor in the chain) for every MX host, including backups and gateways.
  • Verify each record against the key the host actually presents on port 25, with SNI and without.
  • Configure certificate automation to reuse keys or to publish the next TLSA record before installing a new key.
  • Scope, vault and rotate the DNS API credential that can change TLSA records.
  • Run daily synthetic DANE checks and alert on mismatches and RRSIG expiry.
  • Write and test a rollback runbook: republish a record for the live key first; disable inbound DANE only as a last resort.

Standards and references

Related NHI Mgmt Group resources: SMTP Security, STARTTLS and MTA-STS Guide · DNSSEC Deployment Guide · DNSSEC Validation Failures · Certificate Expiry Outages and 47-Day TLS Certificates Guide · Email Authentication Checklist

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.