---
title: "TXT Record"
description: "A TXT record stores arbitrary text in a DNS zone. Learn how it powers SPF, DKIM and DMARC email authentication and domain ownership verification."
url: "https://nodea.io/en/glossary/txt-record"
lang: "en"
updated: "2026-07-13"
---

# TXT Record

> A TXT record is a DNS zone entry that stores an arbitrary text string, most often used for email authentication and to prove ownership of a domain.

A **TXT record** is a type of entry in a [DNS zone](https://nodea.io/en/glossary/dns) that associates an arbitrary text string with a domain name. It was originally designed to hold human-readable notes, but over the years it became a general-purpose carrier for machine-read data. Today its main jobs are email authentication and proving that whoever configured the record actually controls the domain.

## How a TXT record works

A TXT record consists of a host name, the type *TXT*, and a quoted value. When a resolver queries that name, the authoritative server returns the value — exactly the way an A record returns an IP address, except the payload is free-form text. A single TXT string is capped at 255 characters; longer values such as DKIM keys are split into several concatenated strings that the resolver stitches back together.

DNS itself assigns no meaning to the text — the application reading it decides what it means. A mail server looking for an SPF policy queries the domain's TXT records and interprets only the one starting with *v=spf1*, ignoring the rest.

## TXT records in practice

The most common uses are:

- **[SPF](https://nodea.io/en/glossary/spf)** — the list of servers allowed to send mail for the domain,
- **[DKIM](https://nodea.io/en/glossary/dkim)** — the public key used to verify a message's cryptographic signature,
- **[DMARC](https://nodea.io/en/glossary/dmarc)** — the policy for handling messages that fail SPF or DKIM,
- **ownership verification** — Google Search Console, Microsoft 365 and certificate authorities ask you to add a unique TXT token.

TXT records are edited in the DNS panel of your hosting provider or registrar. After any change, confirm it with *dig TXT yourdomain.com* and remember that the update propagates according to the record's TTL. A correctly configured SPF, DKIM and DMARC trio measurably improves deliverability and makes it far harder for anyone to spoof your domain.

### How many TXT records can a domain have?

There is no hard limit — a single name can hold multiple TXT records for different purposes, such as an SPF policy, a Google verification token and a DKIM key on a separate subdomain. The one exception is SPF: only a single record beginning with v=spf1 is valid per name.

### Should I publish a DKIM key as a TXT record or a CNAME?

You can do either. Publishing the key directly as TXT keeps everything in your zone, while pointing a CNAME at your mail provider lets them rotate keys without you editing DNS each time. Managed providers usually recommend the CNAME approach.

## Related

- [DNS](https://nodea.io/en/glossary/dns)
- [MX record](https://nodea.io/en/glossary/mx-record)
- [SPF](https://nodea.io/en/glossary/spf)
- [DKIM](https://nodea.io/en/glossary/dkim)
- [DMARC](https://nodea.io/en/glossary/dmarc)

---

Languages: [pl](https://nodea.pl/pl/slownik-pojec/rekord-txt.md)  
Site index: [llms.txt](https://nodea.io/en/llms.txt)
