FAQ Domains & DNS

How to add a TXT record

A TXT record just holds text for another system to read, most often used to prove domain ownership or authorise a mail sender.

Updated 4 min read Beginner

A TXT record holds arbitrary text against a name, and DNS itself does not interpret it — the meaning depends entirely on whatever system reads it back. In practice, the two things you will add a TXT record for almost every time are proving you own a domain to a third-party service, and publishing email authentication rules such as SPF.

Adding one

In the DNS section of your control panel, add a new record and choose TXT as the type. You need:

  • The name — usually @ for the bare domain, though some verifications and DKIM signing use a specific subdomain name instead, such as selector1._domainkey.
  • The value — the exact text the requesting service gives you, wrapped in quotes if your panel requires it.
yourdomain.com.   TXT   "v=spf1 include:_spf.example-host.com ~all"
Copy the value exactly, in full

TXT values for verification codes and DKIM keys are often long, and it is easy to lose a character or introduce a line break while pasting. A single missing character makes the whole record fail validation, and the resulting error rarely points back at "you mistyped this" as the cause.

Can a name have more than one TXT record?

Yes — unlike a CNAME, a name can hold several TXT records at once, each read independently. There is one important exception: SPF specifically requires exactly one TXT record starting with v=spf1 per domain. Two separate SPF records is treated as a hard failure by receiving mail servers rather than either one being picked, so if you need to add another sender, extend your existing SPF record with another include: rather than publishing a second one.

Confirming it worked

Query the record directly rather than relying on the requesting service to say it can see it, since that check may run on its own delay:

dig +short TXT yourdomain.com
nslookup -type=txt yourdomain.com    # Windows

The output should show your text exactly as entered, in quotes. If it does not appear yet, the record may still be spreading — see how long DNS propagation takes for realistic timing before assuming something is wrong.

Common uses you will run into

PurposeTypical name
Domain ownership verification@ (bare domain)
SPF (which servers can send your mail)@ (bare domain)
DKIM (signed mail authentication)a selector name, e.g. selector1._domainkey
DMARC (mail failure policy and reports)_dmarc

Full setup steps for the email-related ones are covered in setting up an SPF record and setting up DKIM signing, and the background on how all three fit together is in SPF, DKIM and DMARC explained.

Related reading