What is TXT Record?

A TXT record is a flexible DNS entry that stores arbitrary text, most importantly the SPF, DKIM, and DMARC data that authenticate email.

A TXT record is a DNS entry designed to hold arbitrary text data associated with a domain. Originally intended for human-readable notes, it has become the workhorse of machine-readable domain configuration, carrying structured strings that other systems parse for verification and policy.

The most important use of TXT records today is email authentication. SPF policies, DMARC policies, and DKIM public keys are all published as TXT records. An SPF record lives as a TXT entry at the domain root, DMARC at _dmarc.yourdomain.com, and DKIM keys at selector-based hostnames under _domainkey.

TXT records are also how countless services verify domain ownership. When you connect a domain to Google Workspace, a payment processor, or a marketing platform, you are typically asked to add a unique verification token as a TXT record, proving you control the domain's DNS.

Because a domain can hold many TXT records, reading them is the fastest way to audit a domain's email and verification setup. A single misplaced character in an SPF or DKIM TXT record breaks authentication silently, so inspecting these records with a DNS lookup is a routine first step in troubleshooting deliverability.

Examples

  • v=spf1 include:_spf.google.com ~all - an SPF policy stored as a TXT record
  • google-site-verification=abcd1234 - a domain ownership verification token
  • v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com - a DMARC TXT record at _dmarc

Common questions

How many TXT records can a domain have?
A domain can have many TXT records for different purposes, but only one valid SPF record. Multiple SPF entries cause a permerror, so SPF must be merged into a single TXT record.
Where do DKIM and DMARC records live?
DKIM public keys are TXT records at selector hostnames under _domainkey, and DMARC policies are TXT records at _dmarc.yourdomain.com. Both are queried by receiving mail servers during authentication.
How do I check my TXT records?
Query the domain's TXT records with a DNS lookup tool. This reveals SPF, DKIM, DMARC, and verification tokens so you can confirm authentication is set up correctly.

Related tools

Related terms for TXT Record