Domains, CDN & Web Delivery

TXT Record

Definition

The value of a TXT record is a free-form string, limited to 255 characters per chunk, with longer values stored as several chunks joined together. A single host can carry many TXT records at once, and each reader picks out the one it cares about by looking for a prefix it recognises. That convention is how one field ended up carrying so much unrelated work: SPF policies begin with v=spf1, DMARC lives at the _dmarc host, DKIM keys sit under a selector, and verification tokens are usually a provider prefix followed by a random string. Verification records normally go at the apex domain or at an underscore-prefixed name the provider specifies. The text itself means nothing to DNS, which simply stores and returns it.

Why It Matters

Verification exists because otherwise anyone could type your domain into a hosting dashboard and start collecting requests for it — and, worse, ask a certificate authority for a certificate in your name. Requiring a record only the zone's controller can create closes that door. It matters in the other direction too: TXT is a shared field, so a careless edit takes out things that have nothing to do with hosting. Replace an existing SPF entry while pasting in a verification token and your invoices start landing in spam the same afternoon, with no obvious connection to the domain change you made.

How It Works

The provider shows you a host and an exact value to store. You add it at your DNS provider, and their system queries the authoritative nameservers for that host until it finds a matching string, usually within minutes. Once matched, the domain is bound to your account and the provider will serve your content for it. The same mechanism issues certificates: the ACME DNS-01 challenge asks for a one-off token at _acme-challenge under your name, and because that proves control of the zone rather than of a single web server, it is the only way to obtain a wildcard certificate. Many providers keep re-checking the verification record afterwards, so it is not scaffolding to be removed.

Real-World Example

A firm connects docs.hart.co.uk to a set of PDFs published on 99helpers. Alongside the CNAME, the dashboard asks for a TXT record at the host it names, containing a token unique to their account. They paste it in, leave the existing SPF and DKIM records alone, and the domain verifies in about two minutes. The certificate follows on its own, and the whole change touches nothing that their email depends on.

Common Mistakes

  • Overwriting an existing TXT record rather than adding another — a host may hold many, but only one SPF policy, and clobbering it breaks mail delivery
  • Wrapping the value in quotes that the provider adds for you — the stored string ends up double-quoted and never matches the check
  • Deleting the verification record as soon as the green tick appears — providers re-check on a schedule and will unbind the domain when it goes missing

Related Terms

Put a file online in seconds

Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.

Host a file free →