The TXT record (Text record) stores arbitrary text data associated with a domain name. Originally intended for human-readable notes, TXT records are now crucial for email authentication (SPF, DKIM, DMARC), domain verification, and various other machine-readable purposes.
Check TXT records for any domain using our free DNS lookup tool.
Look Up TXT Records →A TXT record allows domain owners to store text strings in their DNS. These strings can contain any information, but are most commonly used for:
A TXT record consists of these components:
| Component | Description | Example |
|---|---|---|
| Name | The domain or subdomain | example.com |
| Type | Record type identifier | TXT |
| TTL | Time to live (cache duration in seconds) | 3600 |
| Value | Text string (up to 255 chars per string) | "v=spf1 include:_spf.google.com ~all" |
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
This TXT record contains an SPF policy that authorizes Google's mail servers to send email for example.com.
SPF records specify which mail servers can send email for your domain:
example.com. 3600 IN TXT "v=spf1 ip4:192.0.2.0/24 include:_spf.google.com -all"
DKIM records contain public keys for email signature verification:
selector._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
DMARC records define policy for handling email authentication failures:
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]"
Services require TXT records to verify domain ownership:
; Google Site Verification
example.com. 3600 IN TXT "google-site-verification=abc123xyz789..."
; Microsoft 365 Verification
example.com. 3600 IN TXT "MS=ms12345678"
; Facebook Domain Verification
example.com. 3600 IN TXT "facebook-domain-verification=abcdefg123456"
Various security-related information can be stored in TXT records:
; Security contact info (RFC 9116)
_security.example.com. 3600 IN TXT "security_contact=mailto:[email protected]"
; MTA-STS hints
_mta-sts.example.com. 3600 IN TXT "v=STSv1; id=20240101000000Z"
A domain can have multiple TXT records at the same name. This is common and valid:
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
example.com. 3600 IN TXT "google-site-verification=abc123..."
example.com. 3600 IN TXT "facebook-domain-verification=xyz789..."
A single TXT string is limited to 255 characters, but longer values can be split across multiple strings:
example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA" "1234567890abcdefghijklmnopqrstuvwxyz..."
DNS servers automatically concatenate these strings when the record is queried.
| Limit | Value | Notes |
|---|---|---|
| Single string length | 255 characters | Split longer values into multiple strings |
| Total record size | ~65,535 bytes | Practical limit is much lower |
| UDP response size | 512 bytes (traditional) | EDNS extends this to ~4096 bytes |
| SPF DNS lookups | 10 lookups | SPF-specific limit per RFC 7208 |
You can look up TXT records using various command-line tools:
# Using dig
dig example.com TXT
# Using nslookup
nslookup -type=TXT example.com
# Using host
host -t TXT example.com
Common issues and solutions:
DNS Explorer — Track TXT records including SPF, DKIM, and DMARC across your domain portfolio. Get alerts when critical email authentication records change.
Start free DNS Explorer trial14-day full-feature trial
Use our DNS Record Finder to look up TXT records for any domain.
Look Up TXT Records →