Guides TLSA / DANE
What is DANE (TLSA)?
How can a sender check the identity of example.com's mail server? Find out how to configure TLSA, test the connection and change keys safely.
A server delivering mail to example.com needs a way to check that it has reached your mail server. You can publish a value identifying your server in DNS. A supporting sender compares it with the digital proof presented during the connection. This method is called DANE. Its DNS entry is a TLSA record.
One mail server for example.com
In this example, example.com receives mail on a server also named example.com. DNS identifies the receiving server in an MX record. Another mail server connects to it to deliver a message.
During an encrypted connection, the receiving server presents a certificate: digital proof containing its public key. The sender needs to know whether that key belongs to the intended server. You therefore publish a value identifying the key in DNS beforehand. This value is often called a fingerprint or hash.
A sender that supports DANE retrieves the TLSA entry and compares it with what the server actually presents. The DNS information must itself be checked for authenticity. That requires a signed chain of trust. This protection is called DNSSEC. A visible record without that check is not enough.
For delivery between mail servers, this example uses port 25. The corresponding record name is _25._tcp.example.com.
Where the record belongs
The receiving mail server may have a different name from the domain. Start with your domain's MX records: they name the servers receiving your mail. For an MX host called mail.example.com, SMTP on port 25 uses _25._tcp.mail.example.com. _25 is the port and _tcp the transport protocol.
Check every receiving MX, including backups. If your mail provider uses mx.provider.example, the record belongs in its DNS zone. Publishing under example.com cannot protect that provider hostname. Ask the provider about its DANE support and published values.
What 3 1 1 means
For SMTP, the usual recommendation is 3 1 1. Its fields mean:
3: authenticate the server's own certificate using DANE, also called DANE-EE.1: select the public key in the binary SubjectPublicKeyInfo (SPKI) structure.1: compare the SHA-256 fingerprint of that SPKI. This is 64 hexadecimal characters.
Format example: _25._tcp.mail.example.com TLSA 3 1 1 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef. This hash is invented and does not belong to your server: do not publish it.
Have your mail administrator or provider derive the real hash from the public key actually in use. It must be the SHA-256 hash of the DER-encoded SPKI, not the text of a PEM file or, for this type, the whole certificate. The DNS administrator publishes that value at the correct name and checks DNSSEC and TTL. A live SMTP DANE test then checks that the server matches it.
With 3 1 1, DNSSEC establishes trust in that key. A public CA need not separately approve DANE authentication. Other TLSA types work differently. Follow your provider's configuration rather than copying only the three digits.
Understanding DNSSEC and the scan result
DNSSEC must securely bind the route to the right MX and the TLSA information used. A signed zone or a visible TLSA record alone is not enough. A supporting sender uses a validating DNS service to check that chain.
The main distinctions in a report are:
- No TLSA record: no publication was found at the checked name. This differs from a failed measurement.
- TLSA present but DNSSEC validation unconfirmed: the scan cannot confirm DANE for this route. Missing AD confirmation alone does not prove the zone is unsigned. A demonstrably insecure route (
insecure) does not provide DANE authentication for that route. - Invalid DNSSEC (
bogus) or a lookup failure: treat this as a fault or an inconclusive measurement. SERVFAIL alone does not prove DNSSEC caused it. Do not blindly disable protection to clear the error. - The checked DNS service reports usable TLSA as validated and confirms the relevant MX route: that establishes the DNS part according to this measurement. STARTTLS and the live key match still need a separate test.
DNS Radar uses the validation result from the checked DNS service and does not open an SMTP or TLS connection itself. Secure TLSA publication at a provider hostname also does not automatically prove that the route from your receiving domain is protected by DNSSEC.
Renewing certificates and changing keys safely
A new certificate with the same public key does not change the 3 1 1 hash. A different key does. An association with the whole certificate may also need updating at an ordinary certificate renewal. Manage renewal and DNS publication together. Reusing a key is not advice to keep it indefinitely.
For a planned key change keeping the same 3 1 1 parameters:
- First publish the new hash alongside the old one and check that every nameserver returns the expanded set.
- Before changing the server, wait at least twice the TTL that applied to the old TLSA set. If it was one hour, allow at least two hours from complete publication. Lowering a TTL now does not shorten existing caches retroactively.
- Then install the new key and certificate on every relevant server instance and test the live DANE connection.
- Remove the old hash only when no active instance uses the old key and the new route has been checked.
This sequence applies to a planned change with the same record type. A different TLSA type, changed DNSSEC chain, or emergency replacement after key compromise needs its own plan. Merely publishing first and immediately switching can stall mail from senders holding old cached data.
DANE, MTA-STS and websites
DANE and MTA-STS can both protect incoming mail transport for senders that support them. DANE requires a working DNSSEC chain. MTA-STS uses HTTPS policy and trusted certificates. What is practical depends on your mail and DNS providers. You can deploy both, but publishing one does not repair a fault in the other.
Mainstream web browsers do not use TLSA as their standard certificate check. For a website, use HTTPS with a valid trusted certificate and, where appropriate, HSTS to make browsers require HTTPS. MTA-STS is for mail, not websites.
A TLSA record at your domain itself, or on port 443, 465 or 587, does not automatically cover this mail route.
Primary sources
Frequently asked questions
Do I need DNSSEC?
Yes. DANE authentication requires validated DNSSEC information. An unsigned answer and an invalid DNSSEC chain are different situations, though: a validation failure can delay mail from supporting senders. Read the DNSSEC guide first and have the whole mail route checked.
My TLSA result is good. Has my certificate been tested too?
No. DNS Radar assesses DNS publication, observed validation status and routing. The scan does not see the server certificate actually presented. Have your administrator run a live SMTP DANE test for every MX as well.
Must I update TLSA at every certificate renewal?
Not with 3 1 1 while the SPKI stays the same. A key change changes the hash, so the DNS update must safely precede the server change. Other record types may need an update even when a new certificate keeps the same key.
Can I enable DANE if my mail provider does not offer it?
Not just by adding a record under your own domain. The correct name belongs to the receiving MX host and the value must match its live server. Discuss who manages that zone and key with the provider. MTA-STS may be another option if the environment supports it.