What Are TXT Records in DNS?
Learn what DNS TXT records are, how they are used for verification and email authentication, and what to check when TXT records fail.
Tools For This Topic
What TXT records are
TXT records are DNS records that store text strings. Other systems can query those strings and interpret them as instructions, verification tokens, or policy data.
Although the name sounds generic, TXT records are now critical to many real-world workflows including email authentication, domain ownership validation, and service configuration.
They are especially common because many platforms need a standards-friendly way to publish machine-readable information without introducing a dedicated new record type.
Common uses for TXT records
- SPF policies that authorise sending infrastructure
- DKIM public keys published on selector hostnames
- DMARC policies published at the _dmarc subdomain
- Google, Microsoft, and other vendor verification tokens
- Site ownership validation for SaaS platforms and security services
Example TXT records
example.com. 3600 IN TXT "google-site-verification=example-token"
example.com. 3600 IN TXT "v=spf1 include:spf.protection.outlook.com -all"
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"These examples all use TXT records, but they serve very different purposes. That is why you should always interpret a TXT record in the context of the hostname where it is published.
Why TXT records matter
TXT records often control security-sensitive behaviour. A missing or malformed TXT record can break email authentication, prevent a domain verification from completing, or stop a third-party platform from trusting your domain.
Because TXT records are so flexible, they also become crowded over time. Mature domains often have many TXT records, which makes change control and validation more important.
Common TXT record mistakes
- Publishing the record at the wrong hostname
- Breaking quoting or spacing when copying a vendor value
- Adding multiple SPF TXT records instead of maintaining one valid SPF policy
- Assuming propagation is complete without checking authoritative DNS
- Removing an old-looking verification token that is still required by a service
How to check TXT records safely
When validating a TXT record, check the exact hostname first, then compare the authoritative answer with at least one public resolver. That helps you distinguish a publishing problem from normal propagation delay.
For email-related TXT records, also confirm the record is logically correct after lookup. A TXT response can exist and still be wrong if the SPF syntax is invalid, the DKIM selector is incorrect, or the DMARC policy is published at the wrong label.
Use These DNS Pro Tools
If you want to validate this topic in practice, these DNS Pro tools are the fastest next step.
Related Tools
Related Articles
What is a TXT record?
Learn what a DNS TXT record is used for, what TXT records look like, and why they are so common in verification and email security setups.
What are glue records?
Learn what glue records are, when they are required, and why they are critical for keeping in-bailiwick nameserver delegation resolvable.
What Is an A Record? DNS A Record Explained
Learn what an A record is, how it maps a hostname to an IPv4 address, where it is used, and how to troubleshoot common A record issues.
