Skip to content

TXT records: short notes for other services to read

Up to date as of 28 November 2026

A TXT record is a short note you pin to a domain. It holds plain text, and the text means whatever the service reading it says it means.

The original specification says "TXT RRs are used to hold descriptive text."1

Its meaning "depends on the domain where it is found."1

So DNS doesn't care what the note says. Some other program does.

Why services ask you to add one

Say you sign up for an email service or a site tool and tell it you own a domain. It can't just take your word. So it gives you a unique string of characters and asks you to put it in your DNS.

Only someone who can edit the domain's DNS can do that. When the service finds its string there, it treats you as the owner. Google's help page says you add "a unique text (TXT) record in your domain settings, which proves you own your" domain.2

How a TXT check proves ownershipService gives you a unique codeYou add it as a TXT recordService looks up your domain's TXT recordsIt finds the code and confirms you
Only someone who controls the domain's DNS can add the code.

What you'll see in your settings

Adding one means filling in a few boxes. The labels change between providers, but the idea is the same.

  • Type: TXT.
  • Name, host or alias: for the bare domain, Google's instructions say "Leave this blank, or enter @". Your provider may use one or the other, so follow its form.2
  • Value, answer or destination: the code the service gave you, copied exactly.

Then save, and wait. Google says "It can take up to 72 hours for the new" TXT records to be recognised. That's an upper limit on one service's page, not a promise it will take that long.2

A check that runs too early fails, even though your record is fine. Try again later before you change anything. Why this happens is covered in TTL and propagation.

Leave it in place until the check passes

Google adds a warning. "The unique TXT record must stay in your domain's DNS" settings until its check succeeds.2 Delete it early and you'll have to start again.

Only copy a code from the service's own screen, while you're signed in to that service. Don't paste codes from emails or messages you didn't expect. And don't share your password or a two-factor code with anyone who says they'll add the record for you.

Other jobs for TXT records

Because a TXT record can hold any text, services have found other uses for it. Email is the usual one. Microsoft's setup page lists an SPF record, which it says "helps prevent email spam".3

Some services store a name and a value in the text, split by an equals sign. An old specification describes that pattern: "The name and value are" separated by "=".4 Google's code works that way, as "google-site-verification=" followed by a code.2

This site doesn't cover how to set up email authentication. Your email provider's own guide gives the exact text to use. Follow that, not an example from elsewhere.

Tidying up later

Before you delete an old TXT row, read the help page of the service that asked for it. Keep any row it still says it needs. Telling which row is which gets easier once you've worked through a sample zone.

Notes and sources

  1. RFC 1035: Domain names, implementation and specification, IETF (RFC Editor)
  2. Verify your domain with a TXT record, Google Workspace Help
  3. Add DNS records to connect your domain, Microsoft Learn
  4. RFC 1464: Using the Domain Name System to store arbitrary string attributes, IETF (RFC Editor)