TXT Record Lookup: What It Is and How to Check One
TXT records are the most flexible DNS record type — they just hold text — which is exactly why they’ve become the default place to put machine-readable configuration for email authentication and domain verification.
What a TXT record looks like
yourdomain.com. TXT "v=spf1 include:_spf.google.com -all"
The value is a quoted string. DNS providers sometimes hide the quotes in their UI, but they’re part of the underlying record.
What TXT records are actually used for today
Email authentication — SPF, DKIM, and DMARC are all published as TXT records:
yourdomain.com. TXT "v=spf1 include:_spf.google.com -all"
selector._domainkey.yourdomain.com. TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSq..."
_dmarc.yourdomain.com. TXT "v=DMARC1; p=quarantine; rua=mailto:reports@yourdomain.com"
Note that DKIM and DMARC live at specific subdomains (selector._domainkey and _dmarc), not the root — a common source of confusion when people look for them and can’t find anything at the bare domain.
Domain ownership verification — services like Google Search Console, Microsoft 365, and various SaaS platforms ask you to add a TXT record with a specific verification string to prove you control the domain:
yourdomain.com. TXT "google-site-verification=abc123..."
These records serve no ongoing function once verification succeeds — they just confirm control at setup time.
How to look up a TXT record
Browser-based: use the free DNS Lookup tool, select TXT as the record type, and enter the domain.
Command line:
nslookup -type=TXT yourdomain.com
or with dig:
dig TXT yourdomain.com +short
For DKIM or DMARC specifically, query the subdomain, not the root:
nslookup -type=TXT selector._domainkey.yourdomain.com
nslookup -type=TXT _dmarc.yourdomain.com
Reading multiple TXT records at once
Because a domain can have several TXT records for different purposes, a lookup often returns more than one result. Filter by content prefix to identify which is which:
- Starts with
v=spf1→ SPF record - Starts with
v=DKIM1→ DKIM record - Starts with
v=DMARC1→ DMARC record - Starts with
google-site-verification=→ Google verification - Anything else → provider-specific verification or configuration
Validating email-related TXT records specifically
A plain lookup shows you the raw text, but it won’t tell you if the syntax is actually correct. Use the free SPF/DKIM/DMARC checker to validate SPF, DKIM (with your selector), and DMARC records specifically, including flagging missing all mechanisms, empty DKIM keys, and missing DMARC policy tags. For the full SPF syntax reference, see SPF record syntax explained.
If you’re setting these records up ahead of a cold email or outreach campaign, getting the TXT records right is the DNS half of the job — mailbox warm-up and reputation monitoring is the other half, which MailPilot handles.