A TXT record holds text. DNS itself does not care what it says; other systems do. SPF, DKIM keys, DMARC policies and the verification codes services ask you to publish are all TXT records.
| Type number | 16 |
| Holds | One or more strings of up to 255 characters |
| Several on one name | Yes |
| Defined in | RFC 1035 §3.3.14 |
Look up the TXT records of any name
One question to DNS, answered as it is. You can change the record type too.
What it does
Each string inside a TXT record can be at most 255 characters. Longer values — a 2048-bit DKIM key, a long SPF record — are split into several strings in the same record, which SPF and DKIM join back together without spaces.
A name can carry several TXT records at once (an SPF record and three verification codes, say). What must not happen is two SPF records, or two DMARC records: each system expects exactly one record that starts with its own tag.
How it is written
| Field | Meaning |
|---|---|
| Name | @, or a special name such as _dmarc or selector._domainkey |
| Value | One or more quoted strings |
Examples
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"
An SPF record.
_dmarc.example.com. IN TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
A DMARC record.
example.com. IN TXT "google-site-verification=abc123…"
A verification code.
Common mistakes
- A second SPF or DMARC record added instead of editing the first.
- A long value split into two separate TXT records instead of two strings in one record.
- Quotes pasted into a DNS panel that adds its own, so the value starts with a stray quote.
What we recommend
Keep one SPF and one DMARC record, remove verification codes once the service is verified, and check long records after publishing.
SPF, DKIM and DMARC explained →
Sources
Checked on 25 September 2026 against these official sources:
- RFC 1035: Domain names — rfc-editor.org