Skip to content
AdminKit

TXT record

What is TXT record?

A TXT record is a DNS entry that holds arbitrary text, originally meant for human-readable notes but now used almost entirely to carry machine-readable policy strings other systems parse automatically, such as the SPF policy AdminKit's SPF check tool reads directly from a domain's TXT record. A domain can publish several unrelated TXT records at once.

By AdminKit team, Netbase JSC · Updated

A TXT record is a DNS entry that holds arbitrary text, originally meant for human-readable notes (RFC 1035) but now used almost entirely to carry machine-readable policy strings that other systems parse automatically. TXT is resource record type 16, one of the record types IANA lists in its DNS Parameters registry. SPF policies, DKIM public keys, DMARC policies, and one-off domain-ownership verification strings for services like a cloud provider or SSL certificate issuer are all published as TXT records on specific names, the same set of common uses Cloudflare’s explainer on TXT records lists, and a domain can publish multiple unrelated TXT records at once since each is just a line of text with no structure the DNS protocol itself enforces. Google Workspace’s domain verification instructions are a typical example: the admin copies a unique value beginning google-site-verification= and publishes it as a TXT record at the domain’s DNS host. A TXT record is just one of several record types a zone can mix together under the same DNS protocol — a domain commonly publishes an MX record for mail routing and a CNAME record for an alias alongside whatever TXT records it needs.

Because TXT records have no type-specific syntax validation at the DNS layer, a malformed SPF or DKIM TXT record can be published without any error, only surfacing as a mail-authentication failure once a receiving server actually tries to parse it. RFC 7208, the SPF specification, is a good illustration of how much a TXT record’s “just a line of text” status pushes onto the parser: the RFC defines the entire mechanism grammar a receiving server must implement, since DNS itself validates nothing about the string beyond its length. That length limit applies per character-string: a TXT record’s data is one or more strings of up to 255 octets each, which is why long DKIM keys are published as several quoted chunks in one record.

TXT record is part of AdminKit’s DNS cluster; the full AdminKit glossary lists other related terms.

Frequently asked questions

What was a TXT record originally meant for?

Human-readable notes, per RFC 1035.

What is a TXT record used for today?

Carrying machine-readable policy strings that other systems parse automatically, such as SPF policies, DKIM public keys, DMARC policies and domain-ownership verification strings.

Can a domain publish more than one TXT record?

Yes -- a domain can publish several unrelated TXT records at once, since each is just a line of text with no structure DNS itself enforces.

Does DNS validate the contents of a TXT record?

No -- DNS validates nothing about the string beyond its length, so a malformed SPF or DKIM record can be published without error and only surfaces as a failure once a receiving server tries to parse it.