Domain IP Lookup

TXT Record Lookup: See What a Domain Publishes

TXT records are DNS's sticky notes. Email authentication, domain ownership proofs and service settings all live there. Enter a domain, or a name that starts with an underscore like _dmarc.example.com, and each record is labelled by what it looks like.

Try:

How this page shows a TXT record

Each TXT value is one row. A record can be stored as several quoted strings, and DNS software joins them with no separator when it reads the value. This page shows the joined result without quotes, while dig prints the pieces in quotes, so a long DKIM key appears as two or more quoted blocks there and as one line here. Identical values are listed once, and the order of the rows means nothing, because DNS doesn't promise an order for records of the same type.

When a value starts like a known format, the row gets a label: SPF, DKIM, DMARC, BIMI, TLS-RPT and MTA-STS, plus verification strings for Google, Microsoft 365, Facebook, Apple, Atlassian, DocuSign, Stripe and GitHub. The label only looks at the first characters. A row labelled SPF policy begins with v=spf1, which doesn't mean the policy is valid. For that, use the SPF, DMARC and DKIM checkers.

What ends up in TXT records

  • SPF: the servers allowed to send email for the domain.
  • DKIM: the public key receivers use to verify signed email.
  • DMARC: what to do with mail that fails SPF and DKIM.
  • Domain verification: tokens that prove to Google, Microsoft, Apple and many software vendors that you control the domain.
  • Email security pointers such as MTA-STS and TLS reporting.

Where each kind of TXT record lives

Different records sit at different names, so to see one you have to type its full name into the lookup.

RecordName to look upStarts with
SPFexample.comv=spf1
DMARC_dmarc.example.comv=DMARC1
DKIMselector._domainkey.example.comv=DKIM1
MTA-STS_mta-sts.example.comv=STSv1
TLS reporting_smtp._tls.example.comv=TLSRPTv1
Site verificationexample.comA provider-specific prefix such as google-site-verification=

Want more than raw text? The SPF, DMARC and DKIM checkers parse the record and tell you what's wrong with it.

TXT record mistakes that cost people hours

  • Two SPF records on one name. A domain must publish exactly one, and receivers treat several as an error.
  • A long value split in the wrong place. One TXT string is limited to 255 characters, so long values are published as several quoted strings that DNS joins back together. Chop a DKIM key mid-string without splitting it properly and it stops working.
  • Stray quotes or spaces pasted in from a dashboard, which change the value receivers read.
  • Leaving verification records behind after you stop using a service. They do no harm, but they clutter the zone and tell anyone who looks which vendors you've used.

Checking that a verification record is live

Services that ask you to prove you own a domain give you a TXT value to publish. After you add it, look the domain up here and find the exact string in the results. If it's missing, the record went in at the wrong name, your DNS provider hasn't published it yet, or the domain's nameservers belong to a different provider than the one you edited.

Compare the value character by character. Quotes, trailing spaces and line breaks added by a dashboard are the usual reason a verification fails even though a record exists.

The same lookup on the command line

Documentation values again, so treat this as an illustration of the output shape. For DKIM you need the selector, and DNS can't list the names under a domain. The selector is the s= tag in the DKIM-Signature header of any message the domain sent, and the d= tag names the domain.

$ dig +short TXT example.com
"v=spf1 ip4:192.0.2.0/24 include:_spf.example.net ~all"
"example-site-verification=ab12cd34ef56"

$ dig +short TXT _dmarc.example.com
"v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"

$ dig +short TXT selector1._domainkey.example.com
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..." "...rest of the public key"

$ nslookup -type=txt example.com
example.com     text = "v=spf1 ip4:192.0.2.0/24 include:_spf.example.net ~all"

PS> Resolve-DnsName -Name _dmarc.example.com -Type TXT
Name                  Type  TTL   Section  Strings
----                  ----  ---   -------  -------
_dmarc.example.com    TXT   3600  Answer   {v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com}

Reading an SPF record

SPF is the TXT record people look up most, and its terms are short. Here is what each part of v=spf1 ip4:192.0.2.0/24 include:_spf.example.net ~all means (RFC 7208).

PartMeaning
v=spf1Marks the record as SPF version 1. It has to come first.
ip4:192.0.2.0/24Senders in this IPv4 range are allowed. ip6: does the same for IPv6.
include:_spf.example.netAlso accept whatever the SPF record at that name allows. This is how third-party senders are added.
a, mxAllow the addresses of the domain's own A or AAAA records, or of its MX hosts.
-allEverything else fails. Receivers are asked to treat it as a hard fail.
~allEverything else is a soft fail: suspicious, but often still accepted.
?allNeutral. The record makes no statement about other senders.

A receiver stops evaluating after 10 terms that need a DNS query (include, a, mx, ptr, exists and the redirect modifier), and going over that limit is a permanent error (RFC 7208, section 4.6.4). This page doesn't count them, but the SPF checker does. SPF is also checked against the envelope sender domain rather than the From address people see, which is one reason a message can pass SPF and still fail DMARC.

When a missing record shows up as NXDOMAIN

Look up _dmarc.example.com when no DMARC record exists and the page can answer 'This domain does not exist (NXDOMAIN)'. That message is about the name _dmarc.example.com, which has nothing at all in DNS. It isn't a statement about example.com, and it's the normal way a missing DMARC, MTA-STS or DKIM record appears. NXDOMAIN for the plain domain is a different matter: check the spelling and the registration.

A name that exists but has no TXT data gives a 'no records' result instead. A subdomain with no DMARC record of its own isn't necessarily unprotected, either. Receivers that find none at _dmarc.mail.example.com fall back to the record at the organizational domain, _dmarc.example.com (RFC 7489).

Why a record you added doesn't show

ProblemLikely causeNext step
The new record isn't listed at allIt went into a zone nobody reads, because the domain's nameservers belong to another providerLook up the NS records with the Name Server Lookup and edit the zone there
A lookup for _dmarc.example.com.example.com finds the recordThe dashboard appends your domain automatically and you typed the full nameEnter only _dmarc in the host field, then look the real name up again
The record exists but a service says it can't find itThe value differs by a character, includes quotes the dashboard added, or sits at a different name than the service expectsCompare the row here with the service's instructions, character by character, and check which name it asks for
A DKIM lookup returns nothingWrong selector, or the name is spelled differently from the provider's instructionsRead the selector from a real message's DKIM-Signature header and look up selector._domainkey.example.com
The record was there a minute ago and now looks missingA resolver cached the earlier 'not found' answer, which is kept for a time set by the zone's SOA record (RFC 2308)Wait for that cache to expire or look again from another network

Many providers have you publish a CNAME at selector._domainkey.example.com that points at a key they host. A TXT lookup on that name still returns the key text, because resolvers follow the alias and return the target's TXT record. If you expected a TXT record and see the key anyway, check the name with the CNAME Lookup.

What a TXT lookup can't prove

  • It shows what a public resolver holds, which can lag the zone by up to the old TTL after an edit. To read the zone itself, ask one of its authoritative servers with dig TXT example.com @ns1.example.net.
  • It can't discover names. Selectors, _acme-challenge records and vendor-specific underscore names exist only if you already know them, because DNS has no command that lists everything under a domain.
  • A label is a guess from the first few characters. It doesn't mean the record is valid, aligned with your sending setup, or accepted by the service it was meant for.
  • TXT data isn't inherited. A subdomain doesn't use its parent's SPF record, so mail sent from sub.example.com needs an SPF record at that name.

Frequently asked questions

Guides