A TXT record is a DNS record for attaching free text to a domain. It was originally meant for notes that people would read; today it's used almost entirely for information machines read: email security policies and services checking "is this domain really yours?".
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
example.com. 3600 IN TXT "google-site-verification=AbC123..."
A domain can have several TXT records. Each service recognises its own record by the prefix at the start (v=spf1, google-site-verification= and so on).
What is a TXT record used for?
| Use | Name it's added to | Starts with |
|---|---|---|
| SPF | @ | v=spf1 |
| DKIM | selector._domainkey | v=DKIM1; k=rsa; p= |
| DMARC | _dmarc | v=DMARC1; p= |
| MTA-STS | _mta-sts | v=STSv1; id= |
| TLS-RPT | _smtp._tls | v=TLSRPTv1; rua= |
| BIMI (brand logo) | default._bimi | v=BIMI1; l= |
| Google Search Console | @ | google-site-verification= |
| Microsoft 365 | @ | MS=ms |
| Facebook / Meta | @ | facebook-domain-verification= |
| Apple, Atlassian, Zoom etc. | @ | e.g. apple-domain-verification= |
Verification records are usually checked only once, during setup. Some services (Google Search Console, Microsoft 365) re-verify ownership from time to time, though; delete those records and you may lose admin access to the service.
How do you add a TXT record?
| Field | Example | Notes |
|---|---|---|
| Name / Host | @ or _dmarc | The name the service asks for. Don't append the domain; the panel does that. |
| Type | TXT | |
| Value | v=spf1 mx ~all | Paste the text the service gives you exactly as it is. |
| TTL | 3600 |
Panels handle quotation marks differently: some wrap the value in quotes themselves, others expect you to. Enter the value without quotes, save, then look it up; if you see an extra " at the start or end of the value, fix the record.
Length limit
A single TXT string can be at most 255 characters. Longer values (mostly 2048-bit DKIM keys) are split into several strings that are joined when read:
selector._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh...first255chars" "...rest"
Cloudflare, cPanel and most modern panels split long values automatically. If your panel doesn't and rejects the record, enter the value as quoted chunks as above. Don't put spaces or semicolons between the chunks; they're joined directly when read.
Common mistakes
- Adding a second SPF record. Only one TXT record may start with
v=spf1. For a new service, extend the existing record instead of adding another. - Adding the record to the wrong name. DMARC goes on
_dmarc, DKIM onselector._domainkey. A DMARC record added to@does nothing. - Typing the domain twice. If you enter
_dmarc.example.comin the name field, some panels create the record as_dmarc.example.com.example.com. - Adding line breaks or spaces when copying. Especially with long DKIM keys, a single stray space breaks signature verification.
- Collecting old verification records. Delete the records of services you no longer use. Every TXT record makes your domain's responses larger and can cause trouble with some older resolvers.
Our lookup tool labels your TXT records as SPF, DMARC, DKIM or verification codes, so you can see at a glance what each one is for.
