TLSA record

On this page 7

A TLSA record is a DNS resource record that binds a TLS certificate or public key to a specific service, identified by port, transport protocol and host name, so that clients can verify the server without relying only on public certificate authorities. Among the DNS records used on the Internet, it is the foundation of DANE (DNS-Based Authentication of Named Entities), defined in RFC 6698 and refined in RFC 7671.

A TLSA record is meaningful only when its zone is signed with DNSSEC, because the record itself becomes a trust anchor. Its most important deployment today is authenticated SMTP between mail servers, where it closes the downgrade gap left by opportunistic STARTTLS.

How a TLSA record authenticates a TLS server

A TLSA record works by publishing, in DNS, what the server’s certificate should look like, so that a client can compare the certificate presented during the TLS handshake with that published expectation. The record lives at a special owner name that encodes the service: _25._tcp.mail.example.com describes SMTP on TCP port 25 at that host, and _443._tcp.www.example.com describes HTTPS.

The validation sequence has three steps. The client first performs a DNSSEC-validated lookup of the TLSA name and rejects the answer if the signature chain is broken. It then connects and receives the certificate chain from the server. Finally, it selects the relevant certificate or key according to the record’s fields and checks that it matches the published association data. A mismatch means the connection must fail, which is the essential difference from opportunistic encryption.

The record has four fields. Their meaning is summarized below, with the values seen in real deployments.

FieldValuesMeaning
Certificate usage0, 1, 2, 3Which certificate in the chain is constrained and whether PKIX validation also applies
Selector0, 1Match the full certificate (0) or only its SubjectPublicKeyInfo (1)
Matching type0, 1, 2Exact content (0), SHA-256 hash (1) or SHA-512 hash (2)
Association dataHex stringThe certificate, key or digest the server must present
Fields of a TLSA record

A typical record therefore reads _25._tcp.mail.example.com. IN TLSA 3 1 1 <hash>, where 3 1 1 means the end-entity key, matched by its SHA-256 digest, with no dependency on a public certificate authority.

Certificate usage values and when each applies

The certificate usage field decides where trust is anchored, and it is the most consequential choice an operator makes. RFC 7671 gives the values mnemonic names that are widely used in practice.

UsageNameTrust anchorTypical use
0PKIX-TAA named CA, plus public PKIX validationRestricting which public CA may issue for a web host
1PKIX-EEThe server certificate, plus public PKIX validationPinning one public certificate
2DANE-TAA private or public CA named in the recordOrganizations running their own issuing CA
3DANE-EEThe server certificate or key onlyMail servers and self-issued certificates
Certificate usage values compared

For SMTP, RFC 7672 recommends DANE-EE (3) and DANE-TA (2) and says that PKIX-based usages should not be relied on, because mail servers are frequently reached by names that public CAs cannot verify. With usage 3, expiry dates and host names in the certificate are ignored; only the key match matters, which makes self-signed certificates fully acceptable.

A TLSA record states which certificate a client must accept, whereas neighboring records in the same Topic constrain issuance, publish keys for other protocols or carry the DNSSEC chain itself. The comparison below separates these roles.

MechanismQuestion it answersWho enforces it
TLSA recordWhich certificate or key is valid for this serviceThe connecting client
CAA recordWhich CAs may issue certificates for this domainThe issuing certificate authority
SSHFP recordWhich SSH host key fingerprints are genuineThe SSH client
DS and DNSKEY recordsWhether the zone’s signatures are trustworthyThe validating resolver
MTA-STS policyWhether a mail domain requires authenticated TLSThe sending mail server, via HTTPS
TLSA record and neighboring mechanisms

CAA and TLSA are complementary rather than competing: CAA limits who may issue, while TLSA limits what a client accepts, even when a rogue certificate was issued. MTA-STS solves a similar mail problem without DNSSEC but depends on the web PKI and on trust-on-first-use caching.

Deploying TLSA records for mail and other services

Successful deployment starts with a fully DNSSEC-signed chain for the MX host’s zone, because a validating sender ignores TLSA data that is not provably secure. The MX record itself must also be in a signed zone, otherwise the sender cannot trust the host name it looks up.

  • Publish 3 1 1 records for the current key; matching the public key rather than the whole certificate lets routine renewals reuse the key without a DNS change.
  • Before rotating keys, publish the new and old digests side by side and wait at least two TTLs, then switch the server and remove the old record later.
  • Prefer one record per key and keep TTLs moderate, such as 1 hour, so that emergency changes propagate quickly.
  • Monitor with an external DANE validator, because a broken record silently blocks delivery from strict senders.

Web browsers have not adopted DANE for HTTPS, so TLSA records for port 443 are uncommon outside closed environments. Mail transfer agents such as Postfix and Exim, by contrast, support DANE validation, and several large mailbox providers enforce it for outbound mail.

Failure modes and common misconceptions

Most TLSA incidents are self-inflicted mismatches after certificate renewal, and they are serious because DANE is designed to fail closed. The table lists frequent problems and their remedies.

SymptomLikely causeFix
Mail queued at DANE-aware sendersKey rotated without updating the recordPre-publish the next key digest before rotation
Record ignored by validatorsZone or parent not DNSSEC-signedComplete the DS chain to the parent zone
Validation fails with usage 2Server omits the issuing CA certificateSend the full chain in the handshake
Lookup returns bogusExpired RRSIG signaturesFix automated zone re-signing
Common TLSA problems

A frequent misconception is that a TLSA record encrypts traffic by itself. It does not; it only authenticates the peer, and TLS still performs encryption. Another is that TLSA replaces DNSSEC. In fact, the record is worthless without DNSSEC, because an attacker who can forge DNS answers could forge the TLSA data as well.

The short version

A TLSA record is a note in the domain’s address book that says what the server’s identity card should look like. When another computer connects, it reads the note and compares it with the card the server shows. If they differ, it refuses to talk.

The note can be trusted only because the address book is sealed with DNSSEC signatures. In short, a TLSA record lets a domain owner vouch for its own servers, instead of relying entirely on outside certificate companies.

Where it makes a difference

A mid-sized university runs its own mail servers and signs its zone with DNSSEC. Its administrators publish a `3 1 1` TLSA record for each MX host, containing the SHA-256 digest of the server’s public key, and they keep a second record with the digest of the next key prepared for rotation.

Months later, an attacker on a transit network tries to strip STARTTLS and intercept messages from a partner institution. The partner’s DANE-aware mail server finds the signed TLSA record, insists on TLS and checks the key. Because the interception attempt cannot present the matching key, the sender defers delivery instead of sending in clear text, and no message is exposed while operators investigate.