Skip to content
Domains and DNS2 min read

What is a TXT record?

Short answer

A TXT record is a DNS record containing free-form text that other services read. Its best-known uses are the SPF, DKIM and DMARC email policies that stop people spoofing your domain, and verification codes that prove you own the domain to services such as Google Search Console.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Main uses
  2. Practical example: checking them
  3. Common mistakes
  4. On ArabyHost

TXT was originally meant for human-readable notes, then became the standard way to publish settings without inventing a new record type for every service. A single name can carry several TXT records at once.

Main uses

Use Name Example value
SPF @ v=spf1 a mx include:_spf.google.com ~all
DKIM default._domainkey v=DKIM1; k=rsa; p=MIIBIjAN...
DMARC _dmarc v=DMARC1; p=quarantine; rua=mailto:[email protected]
Ownership verification @ google-site-verification=abc123...

Verification records work on a simple idea: the service gives you a random string and you publish it in your domain’s DNS. Since nobody else can edit your DNS, the string showing up proves you control the domain.

Practical example: checking them

dig TXT example.com +short
dig TXT _dmarc.example.com +short

Or use the TXT lookup tool. To build correct values, try the SPF generator and the DMARC generator.

Common mistakes

  • More than one SPF record: a domain must have exactly one. When you add a service, merge it into the same record with include:, or you’ll get an SPF PermError.
  • Over 10 SPF lookups: every include, a and mx costs a DNS lookup, and the limit is 10.
  • Quotation marks: some editors add them for you; typing them yourself can double them inside the value.
  • Long text: each string inside a TXT record is limited to 255 characters, so long DKIM keys are split into consecutive strings that receivers join back together.
  • Domain name twice: some editors append the domain automatically, so entering _dmarc.example.com produces _dmarc.example.com.example.com.

On ArabyHost

When the domain points to ns1.arabicode.com and ns2.arabicode.com, SPF and DKIM records for its email are added automatically. You can add other TXT records, such as DMARC or a Google Search Console verification code, in the control panel’s DNS editor.

FAQ

Can a domain have more than one TXT record?

Yes, one name can hold several TXT records for different services, such as Google and Microsoft verification. The important exception is SPF: only one SPF record.

Does deleting a verification TXT record unlink the service?

Some services re-check periodically, Google Search Console among them, so removing the record can cost you access. Keep it as long as you use the service.

How long does a new TXT record take to show up?

Usually minutes, unless it was queried before you added it, in which case the negative answer stays cached for a while. Changing an existing record depends on its old TTL.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.