Skip to main content
📄
DNS & email

TXT record

A universal DNS record for arbitrary text - used for SPF, DKIM, DMARC and domain verification

📖 Detailed description

The TXT record is the most versatile entry in DNS. It lets you attach arbitrary text to a domain, and various services have agreed to read it for their own purposes. If you are asking what a TXT record is for, the simplest answer is: it is a notes box that others know how to read and use.

Its most important use is email security. The SPF, DKIM and DMARC records - the three pillars of anti-spoofing protection - are technically just TXT records with agreed-upon contents. SPF starts with v=spf1, DKIM holds a public key, DMARC starts with v=DMARC1. From the DNS point of view they are all TXT entries.

The second common use is domain ownership verification. When you connect a domain to Google Search Console, Microsoft 365 or another service, it often asks you to add a TXT record with a unique code. That is proof you really control the domain's DNS - a bit like showing an ID card. TXT records are also used for extra settings (for example BIMI for a logo in the inbox).

You can check which TXT records your domain publishes - and whether you accidentally have two SPF records at once - with our free DNS Lookup tool at /dns.

Most common problems

Two SPF records in TXT

The standard allows one - with two, SPF verification stops working entirely

A typo in the verification code

The service will not confirm domain ownership, even though the record "is there"

Forgotten, stale TXT records

Out-of-date verification entries clutter the zone and cause confusion during audits

Exceeding the string length

A single TXT string is capped at 255 characters - longer values must be split into parts

How to fix it?

Keep exactly one SPF record (v=spf1) - merge rules rather than creating a second entry

Copy verification codes exactly, with no extra spaces or characters

Remove outdated TXT records once verification or migration is complete

Split longer values (such as a DKIM key) according to your DNS provider's rules

Audit your TXT records regularly - that is where SPF, DKIM and DMARC live

Examples

Good example

yourdomain.com TXT "google-site-verification=abc123..." (one correct entry)

Bad example

two separate TXT records starting with v=spf1 for the same domain

Check this indicator for your website

Get a detailed analysis and personalized tips on how to improve this element on your website.

Start free analysis