TXT Records
A TXT record stores free text at a name. The common uses are email authentication (SPF, DKIM,
DMARC) and proving domain ownership to a third-party service.
Fields
Section titled “Fields”| Field | Example | Notes |
|---|---|---|
| Name | @ or a label | Verification records often use a label like _dmarc. |
| Type | TXT | |
| Content | "v=spf1 -all" | The text, wrapped in double quotes. |
| TTL | 14400 | Seconds. |
Create
Section titled “Create”Console (zone-file view):
@ TXT "v=spf1 mx -all" 14400_dmarc TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com" 14400CLI (wrap the content so the quotes reach the record):
zcp dns record-create --domain examplecom --name @ --type TXT --content '"v=spf1 -all"'API: POST with { "name": "@", "type": "TXT", "content": "\"v=spf1 -all\"", "ttl": 14400 }.
Verify
Section titled “Verify”dig TXT example.com +short# "v=spf1 -all"Common Uses
Section titled “Common Uses”- SPF:
"v=spf1 mx -all"lists the hosts allowed to send mail for your domain. - DKIM: a long public key at a selector name like
selector._domainkey. - DMARC: a policy at
_dmarc, for example"v=DMARC1; p=reject". - Domain verification: a value a provider gives you to prove you control the domain.
- Quoting. Enter the value with or without double quotes. The platform stores it quoted and
returns it quoted. On the CLI, to send the quotes yourself, wrap the value so the shell passes
them through, for example
'"v=spf1 -all"'. - One string per record. For a long DKIM key, keep it as a single record. The platform stores it as given.
- Several values per name. A name holds several
TXTvalues. Creating anotherTXTrecord at the same name adds it to the set. The apex then carries an SPF record and a verification record together. See Several values per name and type.
See also: MX records, Worked examples, Record types