How to Verify Domain Ownership With a DNS TXT Record

Why services ask you to add a TXT record, where exactly to put it, how to confirm it is live and what to do when domain verification keeps failing.

Updated September 29, 2026 5 min read

Use the free TXT Record LookupRead TXT records and spot SPF, DMARC and site verification tokens

Sooner or later every domain owner sees an instruction like "add this TXT record to your DNS to verify ownership". A search console wants it, so does your email provider, a certificate service, a design tool and a single sign-on platform. You paste a long random string into your DNS panel, click Verify, and get "record not found". Was it the wrong name, the wrong format, or just impatience?

This guide explains what TXT records are, why verification uses them, how to confirm a record is really published, and how to tidy up the pile of old tokens that most domains collect over the years.

What a TXT record is

A TXT record attaches free-form text to a DNS name. The DNS itself does not interpret it; programs that read it do. That flexibility is why so many systems use TXT:

Value starts with Used for
v=spf1 SPF, the list of servers allowed to send mail for the domain
v=DMARC1 DMARC policy (at _dmarc.example.com)
v=DKIM1 or k=rsa; p= DKIM public key (at selector._domainkey.example.com)
v=STSv1 MTA-STS policy pointer (at _mta-sts.example.com)
v=TLSRPTv1 TLS reporting address (at _smtp._tls.example.com)
google-site-verification=, MS=, and many others Ownership verification tokens

Why verification works this way

Only someone who controls a domain's DNS can publish records in it. So when a service gives you a unique token and later finds it in your zone, it has good evidence you control the domain. After verification, many services keep checking periodically, so deleting the token can quietly un-verify you later.

Technical details that cause surprises

  • Many TXT records can share one name. Ten verification tokens on example.com is normal. SPF is the exception: only one v=spf1 record is allowed per name.
  • 255-character strings. One TXT string can hold at most 255 characters. Longer values, such as DKIM keys, are stored as several strings and joined by the reader.
  • Quotes. Command-line tools display values in quotes. The quotes are not part of the value; do not paste them into a panel that adds its own.

Check a TXT record with our tool

The TXT Record Lookup shows every TXT record at a name and labels what each one is.

  1. Open the TXT Record Lookup and enter the name you published the record at, for example example.com, or a full name such as _dmarc.example.com.
  2. Leave Also check _dmarc, _mta-sts and _smtp._tls switched on to see mail-related records in the same result, or switch it off to see only the name you typed.
  3. Choose the resolver if you want to compare Cloudflare and Google.
  4. Click Get TXT records.
  5. Each record appears as a card with a label (for example SPF, DMARC or a verification service, or Other), the name it sits on, its TTL, its length and a note if it is split into several strings.
  6. Use the copy button on a card to copy one value, or Copy all for the full list.

If the domain has more than one SPF record, a red warning appears at the top because that breaks SPF.

Other ways to look up TXT

dig +short TXT example.com
nslookup -type=txt example.com
Resolve-DnsName example.com -Type TXT

To see what your DNS host is serving before any cache is involved, query its nameserver directly, for example dig @ns1.dnshost.example TXT example.com. Find the right nameserver with the NS Lookup. The verifying service, though, uses its own resolver, so a direct query only proves the record exists at the source.

Why verification fails and how to fix it

The record is at the wrong name

This is the most common error. Some panels expect only the part before your domain; typing the full name gives example.com.example.com. Others require @ for the root. If the tool finds nothing at example.com, look up example.com.example.com as well. If the record is there, edit the name field.

Extra quotes or spaces

A value saved as "google-site-verification=abc" with literal quote characters, or with a trailing space, will not match. Compare the value shown by the lookup with the one the service gave you.

The service checked before the record was visible

Resolvers that recently looked up the name and got "no record" cache that negative answer, sometimes for the zone's negative TTL. Wait, then retry. The DNS Propagation Checker with type TXT shows whether several public resolvers already see the new value.

Your DNS is hosted somewhere else

If you edited records at your registrar but the domain's nameservers point to a different DNS host, your edit goes nowhere. Confirm where DNS is actually served with the NS Lookup and add the record there.

Cleaning up old TXT records

Over time a domain collects tokens from trials and tools nobody uses any more. They are harmless in DNS terms, but they make the zone hard to audit and can reveal which vendors you use. Before deleting one, confirm the service is no longer in use, because some services re-check and revoke verification when the token disappears. Keep SPF, DMARC, DKIM, MTA-STS and TLS-RPT records unless you know what replaces them; the SPF Record Checker and DMARC Checker help you evaluate those in depth, and the guide on DMARC enforcement covers the policy side.

Frequently asked questions

Can I have more than one TXT record on my domain?

Yes. Any number of TXT records can share a name. Only SPF is limited to one record per name.

How long does a TXT record take to become visible?

A new record is visible immediately to resolvers that have not cached the name. Resolvers that cached a "not found" answer see it after that negative cache expires, which is usually minutes to an hour.

Should I delete the verification record after verifying?

Usually not. Many services re-check the token periodically and remove verification if it disappears. Delete it only when you stop using the service.

Why is my TXT value split into several strings?

Each DNS text string can hold at most 255 characters, so longer values are stored as multiple strings. Receivers join them back together, so this is normal.

Does a TXT record affect my website?

No. TXT records are read only by programs that look for them, such as mail servers and verification systems. They do not change how browsers reach your site.

Try it now: TXT Record Lookup

Loading tool…