21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · DNS

What is a TXT record?

Quick answer

A TXT record is a DNS record that stores text on a domain or label. Mail systems read TXT records for SPF, DKIM and DMARC, and services such as Google Search Console use them to verify domain ownership. A name may hold several TXT records but only one SPF record, and each string is limited to 255 characters.

For domain owners adding email authentication or verification records who want them correct the first time at the right DNS host.

GuideWebJi®
knowledge
Read time
3 min
Sections
5
Updated
14 Nov 2026
Written by
WebJi® team

What is a DNS TXT record and what does it store?

A TXT record is a DNS record that stores free-form text on a name — the bare domain or a label such as _dmarc — which mail systems and online services read to check policies and prove domain ownership. Defined in RFC 1035, it holds no IP address and does not send visitors anywhere.

example.in.          3600  IN  TXT  "v=spf1 include:_spf.google.com ~all"
example.in.          3600  IN  TXT  "google-site-verification=AbC123exampletoken"
_dmarc.example.in.   3600  IN  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@example.in"

These lines are illustrations: the name, TTL and text must be exactly what your mail or verification provider gives you. The quotes mark where each character-string starts and ends; many panels add them for you.

What are TXT records used for?

Most TXT records do one of four jobs: SPF lists who may send mail for the domain, DKIM publishes a signing key, DMARC sets the policy for failed mail, and verification strings prove to services such as Google or Microsoft that you control the domain.

Common TXT record jobs, the name they sit on, and what the text starts with
JobNameText begins with
SPFBare domain (@)v=spf1
DKIMselector._domainkeyv=DKIM1; k=rsa; p=
DMARC_dmarcv=DMARC1; p=
Google Search ConsoleBare domaingoogle-site-verification=
Microsoft 365 domain checkBare domainMS=ms followed by digits

How to write the mail records is in SPF and DMARC setup and what is DKIM. Copy the host and value from the provider; never invent a selector.

Can a domain have more than one TXT record?

Yes: a name can hold many TXT records, such as several verification strings, but it must have only one SPF record — RFC 7208 treats two v=spf1 records as a permanent error that can make SPF fail.

  • One SPF per name: merge senders into a single record, for example v=spf1 include:_spf.google.com include:mail.host.example ~all.
  • 10-lookup limit: SPF evaluation may trigger at most 10 DNS lookups (include, a, mx, redirect); too many includes cause a permerror.
  • One record per DKIM selector: two keys at the same selector break verification.
  • One DMARC record: at _dmarc; extras are ignored or make the policy invalid.

What is the 255-character limit on TXT records?

Each character-string inside a TXT record can hold at most 255 bytes, so long values such as 2048-bit DKIM keys are stored as several quoted strings in one record, which resolvers join with nothing in between.

example.in.  IN  TXT  "v=spf1 include:_spf.example.net " "include:mail.example.org -all"

The space at the end of the first string is part of the SPF text, because the join adds nothing. A split in the wrong place changes the meaning. Some panels split long values automatically on save; after saving, compare the joined result with what the provider asked for.

How do you add or edit a TXT record?

Add the TXT record at the DNS host your domain's nameservers point to; a record saved at any other company never goes live.

  1. Run dig NS example.in +short or a WHOIS lookup to see which DNS host is authoritative.
  2. Open DNS management there and add a record of type TXT.
  3. Use @ or leave the host blank for the bare domain, or enter the exact label given (such as _dmarc).
  4. Paste the value; keep the provider's quotes only if the panel does not add its own.
  5. Save and wait for the old TTL to pass before testing.

On cPanel, use Zone Editor as shown in add a TXT record in cPanel. On Plesk, use the domain's DNS Settings. On WebJi® shared hosting, edit the zone in ControlPanel.Systems.

How do you check that a TXT record is live?

Query the domain's authoritative nameserver first, then a public resolver: if the authoritative server shows the new text and the resolver does not, the old answer is still cached until its TTL ends.

dig TXT example.in +short
dig TXT _dmarc.example.in +short
dig TXT selector1._domainkey.example.in +short
dig @ns1.yourdnshost.example TXT example.in +short   # ask the authoritative server directly

Check the exact name you published, not only the bare domain, or a DKIM selector will look missing when it is present. If the authoritative server lacks the string, the edit went into the wrong zone. The browser-based DNS lookup tool runs the same query without a terminal, and the email authentication checker tests SPF, DKIM and DMARC together.

FAQ

Frequently asked questions

Can I delete an old verification TXT record?

Only if you no longer use that service. Google Search Console, for example, re-checks verification periodically, and removing its record can unverify the property. Label your records in a note so you know which service each one belongs to.

Does a TXT record affect my website?

No. TXT records do not change where the site or email is hosted; A, CNAME and MX records do that. A wrong SPF or DMARC record can, however, cause your own mail to land in spam or bounce.

Why does my SPF record fail with "too many DNS lookups"?

Each include, a, mx and redirect in SPF costs a lookup, and nested includes count too. Over 10 lookups gives a permanent error. Remove services you no longer use, or replace includes with ip4 ranges where the provider publishes them.

How long does a TXT record take to work?

A brand-new record is often visible within minutes. A changed record can take as long as the previous TTL, commonly one hour. A name that was queried while the record was missing can also stay "not found" for the zone's negative-cache time.

Checked against RFC 1035 and RFC 7208, 15 November 2026 · Reviewed by the WebJi® team, Jaipur.

WebJi® since 2005

Ready to get started with WebJi®?

Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.