TXT records: what they’re for and how to add one

TXT records hold text for other services to read: SPF, DKIM, DMARC and domain verification. How to add one without breaking email.

Guide2 min readLast updated
On this page
  1. What TXT records are used for
  2. Adding a TXT record in DirectAdmin
  3. Rules that matter
  4. Checking
  5. If it doesn’t work
  6. Common questions

A TXT record publishes a piece of text on a DNS name. Other services look it up to check something about your domain.

yourdomain.co.uk. 3600 IN TXT "v=spf1 a mx ~all"

What TXT records are used for

UseNameStarts with
SPF (which servers may send your email)@v=spf1
DKIM (email signing key)x._domainkey or a provider’s selectorv=DKIM1
DMARC (email policy)_dmarcv=DMARC1
Domain verification (Google, Microsoft, others)Usually @A code the service gives you

Adding a TXT record in DirectAdmin

  1. Open Account Manager › DNS Management and select your domain.
  2. Choose Add Record, type TXT.
  3. Name: as instructed — the domain itself for @, or _dmarc, and so on.
  4. Value: paste the text exactly. DirectAdmin handles the quote marks.
  5. Save.

Rules that matter

  • Several TXT records can share a name. A verification code and an SPF record can both sit on @.
  • Only one SPF record per name. Two v=spf1 records invalidate each other. Merge them instead. How to set up an SPF record
  • Copy exactly. A missing character in a DKIM key breaks signing.
  • Long values (such as DKIM keys) may be split into several quoted strings; that’s normal.

Checking

dig yourdomain.co.uk TXT +short

If it doesn’t work

These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.

Common questions

What is a TXT record?

A TXT record stores a piece of text in your DNS, which other systems then read. In practice it is used for email authentication (SPF, DKIM and DMARC) and for proving to a service like Google that you own the domain.

This is a general web-hosting explanation, not specific to Traxio.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going