DNS Tools

TXT Lookup

Read text records, including SPF and verification data.

A TXT record holds a piece of text attached to a domain name. DNS itself does not interpret that text. Other software does: mail servers read TXT records to decide whether a message is genuine, and online services read them to confirm that you control a domain.

This tool looks up the TXT records of a name and lists each one in full. A domain often has several, and every one of them appears as its own row.

How to look up TXT records

  1. Type the name into the field. For SPF and most verification strings that is the domain itself, such as example.com.
  2. For DMARC or DKIM, type the full special name instead, for example _dmarc.example.com. Names that start with an underscore are accepted.
  3. Click Lookup. The record type is fixed to TXT.
  4. Read the rows Domain, Record type and Records found, then the DNS records table. The Value column holds the text of each record.

TXT records belong to one exact name. A lookup of example.com does not return the records of _dmarc.example.com or of mail.example.com, so run one lookup for each name you care about.

The example on the page is google.com. The domain of a large company usually returns one SPF record and several verification strings.

How to read the result

Each row of the table is one complete TXT record. DNS stores long text in pieces of up to 255 characters, and a record such as a DKIM key needs two or more pieces. The tool joins them, so you read every record as a single line and can compare it directly with the value your provider gave you.

Your DNS control panel may show the same record with quotation marks around each piece. The quotation marks are not part of the value.

The rows come in no particular order. To find the record you want, look at how each one starts.

PurposeName to look upThe value starts with
SPFexample.comv=spf1
DKIMselector._domainkey.example.comUsually v=DKIM1
DMARC_dmarc.example.comv=DMARC1
Ownership verificationUsually example.comA label chosen by the service, then a random code

If the name has no TXT records, the page says "No records were returned." For _dmarc and _domainkey names this means that the record has not been published, or that the name or selector you typed differs from the one the record was created with.

SPF and the servers allowed to send

SPF stands for Sender Policy Framework. It is a TXT record on the domain that lists the servers allowed to send mail with that domain as the sender. A receiving server compares the address of the connecting server with the list.

A typical record looks like v=spf1 ip4:203.0.113.25 include:_spf.example.net ~all. Receivers read it from left to right, and the first part that matches decides the result.

PartMeaning
v=spf1Marks the record as SPF. It must come first.
ip4:203.0.113.25This IPv4 address may send. A range such as 203.0.113.0/24 is written the same way.
ip6:2001:db8::25This IPv6 address or range may send
aThe addresses in the A and AAAA records of the domain may send
mxThe mail servers of the domain may send
include:_spf.example.netAlso accept every server allowed by the SPF record of that other name
-allEvery other server fails the check
~allEvery other server gets a soft fail: usually accepted, but treated as suspicious

The include part is how you authorize an email service. The service publishes its own list of servers, and your record points to it. When the service adds servers, your record needs no change.

A name may have only one SPF record. If a lookup shows two records that both start with v=spf1, receiving servers report a permanent error and the check gives no pass, even for mail from servers that one of the records allows. This usually happens when a second email service is added and its instructions say to add a TXT record. The fix is to merge both into one record that holds both include parts and a single all at the end.

SPF also limits the work a receiver has to do. Evaluating a record may cause at most 10 further DNS lookups, counting every include, a and mx, including those inside included records. A record that goes over the limit fails as well.

DKIM and DMARC

DKIM adds a digital signature to each outgoing message. The sending service signs with a private key and publishes the matching public key in a TXT record, so that any receiver can check the signature. That record lives at selector._domainkey.example.com. A selector is a label picked by the sending service, and it lets one domain have several keys at once.

A DKIM record holds the key after p=. The key is long, which is why the record is usually stored in several pieces. You cannot list the selectors of a domain through DNS. Take the selector from the setup page of your provider, or from the s= value in the DKIM-Signature header of a message the domain sent.

Some providers ask you to create a CNAME record at the selector name in place of a TXT record. If the TXT lookup is empty, check the same name with CNAME Lookup.

DMARC ties the two together. It is a TXT record at _dmarc.example.com that tells receivers what to do with a message that passes neither SPF nor DKIM for the domain in its From line, and where to send reports.

  • p=none asks for no special treatment. Receivers deliver as usual and send reports. Domains start here while they find out who sends mail in their name.
  • p=quarantine asks receivers to treat failing messages as suspicious, which normally means the spam folder.
  • p=reject asks receivers to refuse failing messages outright.

The rua= part gives the address that receives summary reports. A subdomain without a DMARC record of its own follows the record of the main domain.

Ownership verification strings

Many online services ask you to prove that you control a domain before they let you use it with their product. Search engine consoles and email services are common examples. The service gives you a random code, you publish it as a TXT record, and the service looks it up. Only someone with access to the DNS of the domain can do that.

You can recognize these records in a result by their shape: a short label naming the service, followed by a string of random characters, as in google-site-verification= and a code. Run this lookup after adding one to confirm that it is visible from outside.

Old codes tend to pile up. Some services check once and never again. Others check again from time to time and withdraw access when the record is gone, so ask the service before you delete one. TXT records are public, which means the collection also tells any visitor which services a domain has signed up for.

Problems a TXT lookup helps you find

  • Mail from a new service lands in spam. Check that the SPF record contains the include for that service and that there is still only one SPF record.
  • A service says it cannot verify your domain. Look the name up here. If the code is missing, you may have added it at a DNS provider that does not run the domain, and NS Lookup shows which provider does. When the code is present, compare it character by character with the one the service gave you.
  • A record ended up on the wrong name. Many control panels add the domain to whatever you type, so entering _dmarc.example.com creates _dmarc.example.com.example.com. Look up both names to see where the record went.
  • A domain that sends no mail is being forged. Such a domain can publish v=spf1 -all and a DMARC policy of p=reject. Look up the domain and its _dmarc name to check that both are in place.

The mail servers that receive mail for the domain are a separate record type. MX Lookup lists them.

What this tool does not do

The tool shows the text of each record and stops there. It does not check whether an SPF record is valid, count its DNS lookups, follow its include parts, or test a DKIM key against a real message. You have to read the record yourself or look up the included names one at a time.

It cannot discover DKIM selectors, because DNS offers no way to list the names under a domain. The result shows no TTL values, and the tool does not validate DNSSEC.

The lookup runs on the IP Tracker server through public resolvers run by Cloudflare, Google and Quad9, and the first answer is used. A record you added a moment ago may not be visible yet, and one you deleted may still appear until resolvers drop their stored copy. DNS Propagation shows the TXT answers of four public resolvers next to each other.

The limit is 15 lookups a minute per visitor, and IP Tracker stores no history of the names you check.

Frequently asked questions

How do I check the SPF record of a domain?

Enter the domain and click Lookup, then find the row whose value starts with v=spf1. That row is the SPF record. If no row starts that way, the domain has no SPF record.

Why is only one SPF record allowed?

The SPF standard says a receiver must find exactly one record. With two, it cannot know which one the owner meant, so it reports an error and does not choose.

One record can authorize several services. Put all the include, ip4 and ip6 parts between v=spf1 and the final all.

What is the difference between ~all and -all?

Both describe mail from servers that the record does not list. -all is a hard fail: the domain says such mail is not genuine. ~all is a soft fail: probably not genuine, but the receiver should not reject it on that basis alone.

A third ending, +all, allows every server on the internet, which defeats the purpose of the record.

Why is my DMARC record missing from the result?

DMARC is not stored on the domain itself. Look up _dmarc. followed by the domain, for example _dmarc.example.com. If that lookup is empty too, the domain has no DMARC record.

How do I find my DKIM selector?

Open a message that the domain sent, view its full headers and find the DKIM-Signature line. The value after s= is the selector and the value after d= is the domain. Then look up selector._domainkey.domain with the real values filled in.

I added a TXT record. Why does the lookup not show it?

First check the name. A record created on example.com does not appear under www.example.com, and a doubled name such as _dmarc.example.com.example.com is a frequent mistake.

Then check where you added it. The record must be created at the DNS provider whose nameservers the domain uses. If both are right, wait a while and try again, because resolvers remember the earlier empty answer for some time.

Can anyone read my TXT records?

Yes. DNS is public, and anyone can look up the TXT records of any name they know. Never put a password, an API key or another secret in a TXT record.

Verification codes are safe to publish. They prove control of the domain only because you were able to put them there.