TXT Records in DNS: What They Are and How to Look Them Up

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?

DNSKEY 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:

example.com. IN TXT "v=spf1 include:_spf.google.com ~all"

DKIM:

default._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0G..."

DMARC:

_dmarc.example.com. IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]"

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):

nslookup -type=TXT example.com

macOS and Linux (Terminal):

dig example.com TXT +short

You can also query subdomains, such as:

dig _dmarc.example.com TXT +short

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:

TXT records are simple in format but powerful in what they enable.

Best Practices

Troubleshooting TXT Records

If your service provider says your TXT record is missing or incorrect, here is what to check:

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.




Home DNS Lookup Advanced DNS Lookup Domain Profile Report DNS Explorer Instructions DNSai Chat Domain Name System Email Security SPF, DKIM, DMARC CSV Comparison Utility About

close menu