TXT Record

A TXT record is a DNS record type that holds arbitrary text. Originally intended for human-readable information, TXT records have become the standard container for machine-readable data used in email authentication, domain ownership verification, and service configuration.

What TXT Records Are Used For

Because TXT records have no enforced structure, they have become a universal attachment point for any service that needs to publish metadata about a domain. Common uses include:

The 255-Character String Segment Limit

The DNS wire format limits each individual string within a TXT record to 255 bytes. However, a single TXT record can contain multiple strings that are concatenated together by the resolver before being returned to the application. This means a TXT record can hold data longer than 255 bytes by splitting it into adjacent quoted strings.

In zone file notation, multiple strings in one record look like this:

example.com. IN TXT "v=spf1 include:_spf.google.com include:sendgrid.net " "include:mailchimp.com ~all"

The two quoted strings are treated as a single concatenated value. Many DNS management UIs handle this splitting automatically when you paste a long value, but it is worth understanding if you are editing zone files directly or if a record lookup returns unexpectedly short text.

Multiple TXT Records at the Same Name

A domain can have multiple TXT records at the same owner name, and resolvers return all of them as a set. Most applications that query TXT records are written to handle this correctly — they scan all returned strings looking for a recognized prefix (such as v=spf1 or v=DMARC1).

One important exception: SPF. RFC 7208 specifies that a domain must not have more than one TXT record beginning with v=spf1. If two such records exist, the SPF lookup result is a permanent error, causing SPF checks to fail for all mail from that domain. This is a common misconfiguration when switching email providers — the old SPF record is not removed when the new one is added.

Common Mistakes

Look up the TXT records for any domain

Open DNS Lookup

Query TXT records with the DNS tool →