What is a TXT record? Verification codes, SPF and DKIM in one type
By TechCompare · Updated · How we check
TXT records hold free text, and each service finds its own by a prefix like v=spf1 or google-site-verification=. A name can carry many of them, but only one may be an SPF record.
A TXT record stores plain text on a DNS name. DNS doesn't care what the text says, so it became the place for anything a service needs to read from your domain: codes that prove you own it, the SPF list of mail servers, DKIM public keys and DMARC policies. One name can hold many TXT records, and each service picks out its own.
How this is calculated
Each TXT record is made of one or more strings, and each string can be at most 255 bytes long. That limit goes back to the original DNS spec (RFC 1035), where every string starts with a single length byte. Longer values, like a 2048-bit DKIM key, get split into several strings inside the same record. SPF and DKIM readers join those strings back together with nothing in between, so a split in the middle of a key does no harm.
Where a record sits matters as much as what it says. SPF lives on the domain itself. DMARC lives at _dmarc.example.com. DKIM keys live under _domainkey, at a name like google._domainkey.example.com. Verification codes from search engines, email providers and SaaS tools usually go on the domain itself, which is why a busy domain can carry a dozen TXT records at once.
The DNS Lookup lists every TXT record at a name with its TTL. It joins split strings so long keys read as one value, and it pulls the SPF and DMARC records out of the list and explains them.
Verdict
Add a TXT record whenever a service asks you to prove you own a domain, and leave old codes in place until you're sure nothing reads them. Keep exactly one SPF record on the domain, put DMARC and DKIM at their own names, and let your DNS host split long values. Then look the name up and check that the text matches what you entered.
More DNS scenarios
Related guides
Frequently asked questions
Can a domain have more than one TXT record?
Why is my TXT record split into several quoted strings?
Can I delete old verification TXT records?
Related tools
Subnet Calculator
Calculate network address, broadcast address, and usable IP ranges for IPv4/IPv6.
Use toolText Encoding Converter
Convert text to Base64, binary, hex, URL encoding and HTML entities, and back again.
Use toolJWT Decoder & Validator
Decode JWT headers and claims, check exp, nbf and iat, and verify signatures locally with your own key.
Use tool