Skip to content
Open console

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.

FieldExampleNotes
Name@ or a labelVerification records often use a label like _dmarc.
TypeTXT
Content"v=spf1 -all"The text, wrapped in double quotes.
TTL14400Seconds.

Console (zone-file view):

@ TXT "v=spf1 mx -all" 14400
_dmarc TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com" 14400

CLI (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 }.

dig TXT example.com +short
# "v=spf1 -all"
  • 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 TXT values. Creating another TXT record 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

Ask the ZCP docs

Type a question and pick an assistant. The assistant opens in a new tab and reads this page and the full ZCP documentation, so its answer comes from our docs.

Example questions

Ask with

Your question goes to the assistant you pick, under its own terms.