TXT
Text Record
TXT records store arbitrary text in DNS. They are the foundation for SPF, DKIM, DMARC, BIMI, and domain ownership verification.
Published · Last verified · Maintained by TamingDNS
TXT
Authentication (TXT)
RFC 1035 / RFC 7208 / RFC 6376 / RFC 9989
Yes
TXT "arbitrary text string"
TXT "v=spf1 include:_spf.google.com -all"
3600 s typical; use lower (300 s) when actively changing authentication records
💬 What This Record Does
TXT records hold free-form text in DNS. They became the standard container for machine-readable policies once SPF needed somewhere to live, and everything else followed. SPF, DKIM, DMARC, BIMI, MTA-STS, and ownership proofs for Google, Microsoft, and SSL providers all sit in TXT records. A single domain can have many TXT records on the same name.
Common Uses
- Publishing an SPF record to authorise legitimate senders
- Publishing a DKIM public key at a selector subdomain
- Publishing a DMARC policy at _dmarc.example.com
- Domain ownership verification for Google Search Console, Microsoft 365, etc.
⚠️ Watch Out For
- A single TXT string is limited to 255 characters. Longer values must be split into multiple quoted strings (the resolver concatenates them).
- Multiple SPF TXT records on the same name cause a permerror. There must be exactly one.
- TXT record order is not guaranteed. Policies that depend on order (there are none) are unreliable.
🔧 Related Tools
📋 Complete Example Records
Whole records in zone-file form: name, TTL, class, type, then the data. Most DNS panels ask for the pieces separately. Look them up live with the DNS Lookup tool.
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
Here a TXT record carries SPF. The type itself is generic: what a TXT record means is decided by the name it sits on and the string it holds.
example.com. 3600 IN TXT "google-site-verification=abc123DEF456ghi789JKL012mno345PQR678stu"
A domain-ownership token. Strings like this are the most common TXT records on a busy apex, and every provider issues its own.
example.com. 3600 IN TXT "v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.0/24 " "ip4:203.0.113.0/24 include:_spf.example.net ~all"
One record split into two quoted strings. A single string caps at 255 octets, and RFC 7208 §3.3 says the strings are joined with nothing added between them, so mind the trailing space.
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all" example.com. 3600 IN TXT "MS=ms12345678"
Two separate TXT records on the same name, which is fine. Only publishing two records that both start v=spf1 breaks things.