Skip to content
inetGeek

TXT record

TXT

A TXT record holds free-form text. In practice it carries domain verification tokens and email authentication policy.

Check this on a domain with DNS Lookup →

01.

What a TXT record is for

A TXT record attaches arbitrary text to a name. DNS itself assigns no meaning to the contents — the meaning comes from whatever reads it.

Most TXT records in practice do one of two jobs: proving to a third party that you control a domain, or publishing email authentication policy such as SPF and DMARC.

02.

Character strings and the 255-byte limit

A TXT record is made of one or more character strings, and each string is limited to 255 bytes. A longer value is split across several strings within the same record.

Readers are expected to concatenate those strings with nothing between them. A value split in the wrong place, or joined with a space, produces a policy that looks right in a dashboard and fails in practice.

Splitting a TXT value255 bytes per string

0 bytes → 0 strings

    Illustrative value. A 2048-bit DKIM key is the usual reason a TXT value has to be split; the strings are stored separately and a reader concatenates them with nothing in between.
    03.

    Multiple TXT records at one name

    Unlike a CNAME, a name may carry many TXT records, which is why several verification tokens can coexist on one domain.

    Some consumers require exactly one matching record, though. A domain must publish at most one SPF record, and two is a configuration error rather than a redundancy.

    Related records