A TXT record (Text record) stores arbitrary human-readable or machine-readable text in DNS. Originally intended for informational text, it has evolved into a critical record type for email authentication, domain verification and service configuration.
Common Uses
- SPF — Defines which mail servers can send email for your domain.
- DKIM — Stores the public key used to verify email signatures.
- DMARC — Sets the policy for handling emails that fail SPF/DKIM checks.
- Domain verification — Google Search Console, Microsoft 365, Mailchimp and others require adding a TXT record to prove domain ownership.
- Other services — Atlassian, SendGrid, Stripe and dozens of other platforms use TXT records for setup.
TXT Record Examples
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"
example.com. IN TXT "google-site-verification=abc123xyz456"
_dmarc.example.com. IN TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]"
Multiple TXT Records
Unlike A or CNAME records, a domain can have multiple TXT records on the same name. However, SPF should only have one record — multiple SPF TXT records cause authentication failures.
Character Limits
A single TXT record string is limited to 255 characters. For longer values (like long DKIM keys), the record is split into multiple strings within the same record value, which DNS concatenates automatically.