TXT Records in DNS: What They Are and How to Look Them Up
Among the many types of DNS records, TXT records are some of the most flexible and widely used. They are not involved in routing traffic like A or MX records, but they play a key role in email security, domain verification, and service integrations.
If you own a domain or work with email infrastructure, understanding TXT records is essential. Let us explore what they are, how they work, and how to perform a TXT lookup.
What Is a TXT Record?
A TXT (text) record is a type of DNS record used to store text data. It was originally designed to hold human-readable notes, but over time it became a standard place for storing key-value data used by systems and services.
You can think of a TXT record as a freeform message associated with your domain. That message can be anything, but today, it is typically used for things like:
- SPF records to define mail servers allowed to send on behalf of your domain
- DKIM public keys to verify email signatures
- DMARC policies to guide email handling rules
- Google or Microsoft domain verification tokens
- Custom metadata for apps, APIs, or security tools
What Does a TXT Record Look Like?
Here are some common examples:
SPF:
DKIM:
DMARC:
Each of these TXT records provides critical authentication and policy details to receiving email servers and external platforms.
How to Look Up a TXT Record
TXT lookups are easy using built-in system tools. These let you query DNS directly to see what text data is published for a domain.
Windows (PowerShell or Command Prompt):
macOS and Linux (Terminal):
You can also query subdomains, such as:
These tools return the raw TXT values, which you can use to verify if your records are published correctly or to troubleshoot email issues.
Where TXT Records Are Used
TXT records show up in a variety of real-world situations, especially when setting up external services. Here are a few common use cases:
- Email Authentication: SPF, DKIM, and DMARC all use TXT records to publish their configurations.
- Domain Verification: Platforms like Google Search Console, Microsoft 365, Stripe, and others ask you to add a TXT record to prove ownership.
- App Configuration: Some software and cloud services store tokens or settings in DNS as TXT records.
TXT records are simple in format but powerful in what they enable.
Best Practices
- Keep TXT values under 255 characters per string. If needed, you can split values into multiple quoted strings.
- Avoid duplicate records that conflict or overlap in purpose.
- Use descriptive subdomains for clarity when managing multiple records.
- Use TTL (time to live) settings that balance flexibility with propagation time.
Troubleshooting TXT Records
If your service provider says your TXT record is missing or incorrect, here is what to check:
- Did you enter the record at the right subdomain? (
_dmarc.example.comis different fromexample.com) - Are quotation marks and formatting correct?
- Has enough time passed for DNS propagation (typically 1 to 48 hours)?
- Are you checking with an accurate lookup tool?
Online tools like MXToolbox or Google Admin Toolbox can help confirm your changes.
Final Thoughts
TXT records may not seem flashy, but they are one of the most versatile tools in DNS. They help secure your domain, verify your ownership, and enable integrations across dozens of services.
Knowing how to read, configure, and look up TXT records is a foundational skill for anyone working with web infrastructure, domain management, or email security.
If you are configuring your domain or troubleshooting an issue, a quick TXT lookup can reveal exactly what your DNS is saying to the world.