Store textual information in your DNS for validation and security.
The TXT (Text Record) allows storing arbitrary textual information in your DNS. Originally designed for human-readable notes, it has become a key element of email security (SPF, DKIM, DMARC) and domain ownership verification.
When you configure a new service (Google Workspace, AWS, SSL certificate), you're often asked to add a TXT record to prove you control the domain. This has become the standard domain ownership verification mechanism on the Internet.
TXT records are also critical for email deliverability. Without properly configured SPF, DKIM, and DMARC via TXT records, your emails risk being marked as spam or rejected.
The TXT record stores text in DNS:
TXT records serve several critical purposes:
Follow these steps to add a TXT:
Here are common TXT examples:
; SPF - Authorize Gmail and your servers
example.com. IN TXT "v=spf1 include:_spf.google.com ip4:192.0.2.1 -all"
; DKIM - Public key for signing
selector._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCS..."
; DMARC - Policy and reports
_dmarc.example.com. IN TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]"
; Google verification
example.com. IN TXT "google-site-verification=abc123..."
; Microsoft 365 verification
example.com. IN TXT "MS=ms12345678"
; Verification with dig
$ dig example.com TXT +short
"v=spf1 include:_spf.google.com -all"
"google-site-verification=abc123..."
TXT values are in quotes. A domain can have multiple TXTs for different uses. The v= prefix indicates the version/type (spf1, DKIM1, DMARC1).
Effectively manage your TXT records:
Yes, unlike CNAMEs, multiple TXTs can coexist at the same level. It's common to have SPF, DMARC, and several domain verifications simultaneously.
Each string is limited to 255 characters, but you can have multiple concatenated strings. The total limit depends on the DNS server but is generally several KB.
Common causes: incomplete DNS propagation (wait 24-48h), copy error in value, misplaced quotes in DNS manager, or wrong level (@ vs subdomain).
Some services verify periodically (keep the TXT). Others verify only once (you can delete). Check the service documentation.
Use tools like MXToolbox SPF/DKIM checker, or analyze headers of rejected emails. They usually indicate the reason for authentication failure.
No, TXTs are not queried during normal web browsing. They are read by email servers and verification services occasionally.
TXT records have become essential for email security and domain ownership verification. SPF, DKIM, and DMARC protect your email reputation and your users against phishing and spoofing.
Configure your TXTs correctly, document them, and monitor them with MoniTao. An unauthorized change to your SPF or DKIM records can have disastrous consequences on your email deliverability.
Start free, no credit card required.