Updated
How to Check SPF, DKIM and DMARC Records of a Domain
1. Query the records
curl -s -H 'accept: application/dns-json' \
'https://cloudflare-dns.com/dns-query?name=_dmarc.google.com&type=TXT' | jq -r '.Answer[].data'
# "v=DMARC1; p=reject; rua=mailto:..."
curl -s -H 'accept: application/dns-json' \
'https://cloudflare-dns.com/dns-query?name=google.com&type=TXT' | jq -r '.Answer[].data' | grep spf1
# "v=spf1 include:_spf.google.com ~all"DNS over HTTPS works from any machine with curl, without a local resolver tool.
2. Read the result
- DMARC p=:
noneonly monitors,quarantinesends failing mail to spam,rejectblocks it.rua=is where aggregate reports go. - SPF ending:
-all(fail) or~all(soft fail) are normal;+alllets anyone send as the domain. - DKIM: a TXT record with
v=DKIM1; k=rsa; p=...at the selector the sender uses.
3. Common mistakes
- Two SPF records on the same domain: receivers treat SPF as broken.
- More than 10 DNS lookups through
include:chains: SPF fails with a permanent error. - DMARC published on the domain instead of
_dmarc.. - A temporary DNS failure read as “no record”: retry before concluding that SPF is missing.
4. Many domains
Plainprobe Domain & Tech Stack Intelligence returns SPF, DMARC, DKIM (common selectors), MTA-STS, an e-mail security score, SSL, RDAP dates and the detected technologies as one JSON record per domain, at $0.003 per domain. For the DKIM key and how to find its selector, see How to look up a DKIM record. To see which provider receives the mail, see How to find a domain's e-mail provider.
Limits to keep in mind
- DKIM selectors cannot be listed from DNS, so a missing DKIM result is not proof of absence.
- Records show the published policy, not whether mail actually passes.
FAQ
How do I check a domain's DMARC record?
Query the TXT record of _dmarc.example.com. A valid record starts with v=DMARC1 and its p= tag says what receivers should do with failing mail: none (monitor), quarantine or reject.
How do I check a domain's SPF record?
Query the TXT records of the domain itself and keep the one that starts with v=spf1. There must be only one SPF record, and it should end with ~all or -all.
Can I check DKIM without knowing the selector?
Not reliably. DKIM keys live at selector._domainkey.example.com and the selector is chosen by the sender, so a checker can only try common selectors (google, selector1, selector2, k1 and so on).
Can I check SPF and DMARC for many domains at once?
Yes: loop over the domains with a DNS-over-HTTPS query per record, or use a bulk tool that returns one JSON record per domain with the parsed policy and a score.