Check TXT Record of Domain: How-To & Tools
- Time to live (TTL)
- 24 hours
- You entered
To check the TXT record of a domain, you query its DNS records using a command-line tool like nslookup or dig, or an online DNS lookup service. You enter the domain name, and the tool returns all TXT records, which are often used for email verification (SPF, DKIM) and domain ownership verification.
What Is a TXT Record?
A TXT (text) record is a type of DNS record that stores arbitrary text associated with a domain. Unlike A records (which map a name to an IP address) or MX records (which route email), TXT records are free-form and can hold any string. They were originally meant for human-readable notes, but today they serve critical automated functions.
Common uses include:
- SPF (Sender Policy Framework): Lists mail servers authorized to send email for the domain, e.g.,
v=spf1 include:_spf.example.com ~all. - DKIM (DomainKeys Identified Mail): Contains a public key that email recipients use to verify a message’s signature, e.g.,
v=DKIM1; k=rsa; p=MIGfMA0.... - Domain verification: Proves you control a domain to services like Google Search Console or Microsoft 365, e.g.,
google-site-verification=.... - DMARC (Domain-based Message Authentication, Reporting & Conformance): Though often a separate record type, DMARC policies are sometimes stored as TXT records (e.g.,
v=DMARC1; p=reject).
How to Check TXT Records: Methods
There are three main ways to query a domain’s TXT records. Each has its own strengths.
1. Using Online DNS Lookup Tools
The easiest method for most users is a web-based DNS lookup service. You simply enter the domain name (e.g., example.com) and select “TXTâ€� from the record type. Popular free tools include DNS Checker, MXToolbox, and Google’s Dig tool. These services query multiple global DNS servers, so you can see if a record has propagated worldwide.
2. Using the dig Command (Linux/macOS)
Open a terminal and type:
dig example.com TXT
This returns all TXT records for the domain. To see only the answer section, add +short:
dig example.com TXT +short
If you want to query a specific nameserver (e.g., one that just updated), use @ns1.provider.com.
3. Using nslookup (Windows, macOS, Linux)
On Windows, open Command Prompt and type:
nslookup -type=TXT example.com
On Linux/macOS, you can also use nslookup -q=TXT example.com. The output may wrap long strings, but it shows all TXT records.
Reading the Results
When you query a TXT record, the response includes the record’s value(s). For example:
example.com descriptive text "v=spf1 include:_spf.example.com ~all"
Here, example.com is the domain, descriptive text is a placeholder, and the quoted string is the actual TXT value. Multiple TXT records can exist; each is returned separately. Some providers split long records into multiple quoted strings—you must concatenate them without spaces for the full value.
Note that TXT records are case-sensitive, and the order of multiple records doesn’t matter. Also, DNS caches may delay updates; propagation can take from minutes to 48 hours, though usually under a few hours.
Common Problems When Checking TXT Records
- No results: The domain may not have any TXT records, or the query is against a stale cache. Try a different DNS server (e.g.,
dig @8.8.8.8). - Wrong record: You might be looking at the wrong subdomain (e.g.,
_dmarc.example.comvs.example.com). - Quoting issues: Some tools show quotes; when copying the value, remove them unless the spec requires them.
- TTL confusion: The TTL (time-to-live) shown is the remaining time until the record is refreshed, not when it was created.
How to Choose the Right Method
For a quick one-off check, use an online tool—no installation needed. If you’re troubleshooting email authentication, use dig to see the raw records and verify exact syntax. If you’re a Windows user without admin rights, nslookup is built-in. For automation or scripting, dig is preferred because its output is easier to parse.
Remember: DNS records are public. Anyone can query them, so never put sensitive data in a TXT record.
Safety and Accuracy Tips
When checking TXT records, always verify the domain spelling (watch for typos like exmaple.com). Use a reputable DNS lookup service; avoid entering sensitive domains on unknown sites, as they may log queries. For critical checks (e.g., verifying SPF before changing email), cross-reference with two different tools to ensure consistency.
Also, be aware that some registrars add default TXT records (e.g., verification strings). Don’t delete them without knowing their purpose.
Frequently Asked Questions
How long does it take for TXT record changes to propagate?
Propagation depends on the TTL set on the record. If TTL is 3600 seconds (1 hour), most servers update within an hour, but some ISPs may cache longer. Full global propagation can take up to 48 hours, though it’s usually faster.
Can I see TXT records for a subdomain?
Yes, query the full subdomain, e.g., dig sub.example.com TXT. TXT records are not inherited from the parent domain; each name has its own set.
Why does my TXT record show multiple quoted strings?
Some DNS providers split long TXT values into 255-character chunks. When using the record (e.g., for SPF), you must concatenate the strings without spaces. For example, "v=spf1" "include:_spf" becomes v=spf1include:_spf.
Is there a limit to the number of TXT records?
Technically, DNS responses are limited to 512 bytes over UDP (without EDNS), but modern DNS supports larger. In practice, you can have many TXT records, but each should be kept under 255 characters. Most providers allow dozens.
Can I check TXT records for a domain I don’t own?
Yes, DNS records are public. You can query any domain, but you won’t be able to modify them without access to the DNS management console.
Related
Formula used
in t | Time to live (TTL) | hours | 24 | 0 out ttl_seconds | TTL in seconds | s | t * 3600 | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.