# TXT record

> A TXT record is a DNS record that holds text for a domain. See what it

Canonical: https://scaplet.com/glossary/txt-record

Glossary Glossary · Technical SEO

A TXT record is a DNS record that holds text for a domain. See what it's used for, such as SPF and Search Console verification, with examples and common mistakes.

4 min

read

6

sources

Oct 21, 2026

updated

Scaplet Editorial Team

author

In one line

A TXT record is a DNS resource record that holds text for a domain name. RFC 1035 says TXT records "are used to hold descriptive text" and that the meaning of the text depends on the domain where it is found. Common uses today include proof of domain ownership and email authentication settings such as SPF and DKIM.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Ftxt-record%20(%22TXT%20record%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Ftxt-record%20(%22TXT%20record%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Ftxt-record%20(%22TXT%20record%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Ftxt-record%20(%22TXT%20record%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## At a glance

4 facts from the sources below

TXT (type 16)

Record type

RFC 1035, section 3.3.14

Defined in

One or more quoted text strings

Content

255 octets

Max per string

_01_Explained

## What a TXT record is

DNS maps names to data. An [A record](/glossary/a-record) maps a name to an IP address and an [MX record](/glossary/mx-record) names a mail server. A TXT record maps a name to free-form text. RFC 1035 defines its data as one or more character strings, and says the semantics of the text depend on the domain where it is found.

Because DNS has no built-in meaning for that text, other systems agree on formats and put them there. RFC 1464 describes one such convention, an attribute name and value separated by an equals sign, as in `"printer=lpr5"`. Cloudflare's docs describe the content as one or more text strings delimited by double quotes.

_02_At a glance

## What TXT records are used for

Use

### SPF (which servers may send mail for your domain)

What the record looks like

`example.com. TXT "v=spf1 +mx a:colo.example.com/28 -all"`

Source

RFC 7208 says SPF records MUST be published as a DNS TXT record

Use

### DKIM public keys

What the record looks like

A TXT record at `selector._domainkey.example.com`

Source

RFC 6376 says keys are stored in a subdomain named `_domainkey`

Use

### Domain ownership checks

What the record looks like

A unique string issued by the service you are verifying with

Source

[Google Search Console](/glossary/google-search-console) offers TXT or CNAME for Domain properties

Use

### Certificate issuance checks

What the record looks like

A token placed in DNS to prove control of the domain

Source

Cloudflare says TXT records are most commonly used to demonstrate domain ownership before issuing SSL/TLS certificates

_03_How it works

## Add a TXT record for Search Console

Google says DNS verification is required only for a Domain property such as `example.com`, not URL-prefix properties. Here is the flow Google documents.

Google tells you to pick CNAME instead when a CNAME record is found at the domain whose target is a parent domain of the one you entered. If no CNAME record is found, which Google calls the most common case, use TXT. See [Google Search Console](/glossary/google-search-console) for what the verified property unlocks.

1. 01

### Choose TXT in Search Console

When verifying your Domain property, choose TXT for the record type. Search Console gives you a string value to use.
2. 02

### Add it at your DNS host

In your domain provider's DNS records, create a TXT record. Google says to leave the Host/Name blank or set it to "@", as your provider's documentation describes, and to paste the Search Console string as the Value.
3. 03

### Go back and verify

Click Verify in Search Console. Google says manually installed records can take up to two or three days for your provider to start serving, so if it fails, wait a day or two and try again.

_04_Worth knowing

## Mistakes and limits

### Two SPF records

RFC 7208 says a domain must not have multiple records that would cause an SPF check to select more than one. Merge them into a single `v=spf1` record.

### Long values

A single string is capped at 255 octets. Per RFC 7208, a record may contain several quoted strings, which are concatenated without spaces, so long values are split into pieces. Most DNS dashboards do this for you.

### Inconsistent quotes

Cloudflare warns that mismatched double quotes cause a validation error. If you save TXT content without quotes there, it adds them.

### Record size

RFC 7208 advises keeping the SPF record small enough that the query result fits in 512 octets, and notes that other TXT records at the same name count toward the reply size.

### Removing the verification record

Google says that to stay verified, don't remove the DNS record from your provider, even after verification succeeds.

_05_Check it

## Check a TXT record

Query the name where the record should live. SPF and verification strings sit at the domain itself, and DKIM keys sit under `_domainkey`.

Look up TXT records

```
dig +short TXT example.com dig +short TXT selector._domainkey.example.com
```

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ What is a TXT record used for?

To attach text to a domain name. Common uses are SPF and DKIM email authentication, domain ownership verification for services like Google Search Console, and proving control of a domain before a certificate is issued.

_02_ What is the difference between a CNAME and a TXT record?

A CNAME makes one name an alias of another name. A TXT record holds text and points nowhere. Google's Search Console flow accepts either as a verification method: use CNAME if a CNAME exists whose target is a parent domain of your domain, and TXT otherwise.

_03_ Can a domain have more than one TXT record?

Yes. Many services each add their own. The exception is SPF: RFC 7208 does not allow multiple records at one name that an SPF check would select.

_04_ How long is a TXT record allowed to be?

Each character string in the record can be up to 255 octets. RFC 7208 explains that a record with several strings is read as one concatenated value, which is how longer text is stored.

Sources · 6

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- rfc-editor.org
- google.com
- cloudflare.com

1. 01 [RFC 1035: Domain names, implementation and specification](https://www.rfc-editor.org/rfc/rfc1035) rfc-editor.org · checked 2026-10-25
2. 02 [RFC 7208: Sender Policy Framework (SPF)](https://www.rfc-editor.org/rfc/rfc7208) rfc-editor.org · checked 2026-10-25
3. 03 [RFC 1464: Using the Domain Name System to store arbitrary string attributes](https://www.rfc-editor.org/rfc/rfc1464) rfc-editor.org · checked 2026-10-25
4. 04 [Verify your site ownership (Search Console Help)](https://support.google.com/webmasters/answer/9008080) support.google.com · checked 2026-10-25
5. 05 [Cloudflare DNS: DNS record types](https://developers.cloudflare.com/dns/manage-dns-records/reference/dns-record-types/) developers.cloudflare.com · checked 2026-10-25
6. 06 [RFC 6376: DomainKeys Identified Mail (DKIM) signatures](https://www.rfc-editor.org/rfc/rfc6376) rfc-editor.org · checked 2026-10-25

## Keep learning

[All glossary](/glossary)

[Learn MX record (mail exchange) Technical SEO](/glossary/mx-record) [Related Refused to apply style ... because its MIME type Browser errors](/errors/browser/refused-to-apply-style-from-because-its-mime-type) [Read next Security headers Technical SEO](/glossary/security-headers) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Trust Flow](/glossary/trust-flow) [TTL (time to live)](/glossary/ttl) [unavailable_after](/glossary/unavailable-after) [Unlinked brand mentions](/glossary/unlinked-brand-mentions)

More in Technical SEO
[Content migration](/glossary/content-migration) [Hidden text](/glossary/hidden-text) [JSON Feed](/glossary/json-feed) [Mobile friendly](/glossary/mobile-friendly) [Mobile-first indexing](/glossary/mobile-first-indexing) [MX record (mail exchange)](/glossary/mx-record) [Rate limiting](/glossary/rate-limiting) [React SEO](/glossary/react-seo) [Security headers](/glossary/security-headers) [TXT record](/glossary/txt-record)

Terms on this page
[A record (DNS address record)](/glossary/a-record) [MX record (mail exchange)](/glossary/mx-record) [Google Search Console](/glossary/google-search-console)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
