SPF, DMARC and DKIM record checker
Paste a domain's email authentication records, one per line or straight from dig, and get
each one parsed term by term and checked against its RFC.
Paste-in tool. Your browser cannot fetch another site's headers for a web page (CORS
forbids it), and WebPeeks has no server to do it, so nothing you paste leaves your browser.
Look the records up yourself with dig (macOS, Linux) or nslookup (Windows), or
copy them from your DNS provider's panel, and paste them here. Quotes and the zone-file prefix are fine.
dig +short TXT example.com dig +short TXT _dmarc.example.com dig +short TXT selector._domainkey.example.com nslookup -type=TXT _dmarc.example.com
What the three records do
Email was designed without any way to prove who sent a message. These three DNS records, all published as TXT records, add that proof in layers:
- SPF (RFC 7208), at the domain itself, lists the servers allowed to send mail using this domain in the envelope sender (the bounce address).
- DKIM (RFC 6376), at
selector._domainkey.domain, publishes a public key. The sending server signs each message with the matching private key, and receivers check the signature. - DMARC (RFC 7489), at
_dmarc.domain, ties the two to the address people actually see in the From line, tells receivers what to do with mail that fails, and asks them to send reports.
The link between them is alignment. A message passes DMARC if SPF passes for a domain that
matches the From domain, or a DKIM signature verifies for a domain that matches it. With the default
relaxed alignment, a subdomain counts as a match (mail.example.com aligns with
example.com); with aspf=s or adkim=s it must be identical.
How each record is checked
SPF
Every term is parsed as a mechanism (ip4, ip6, a,
mx, include, exists, ptr, all) with an
optional qualifier (+ pass, - fail, ~ softfail, ?
neutral), or as a modifier (redirect=, exp=). Anything else is a syntax error,
and RFC 7208 treats a syntax error as a permanent error, which fails SPF for all mail. Receivers stop at
the first mechanism that matches, so anything after all is dead.
The 10-lookup limit (RFC 7208 section 4.6.4) is the most common real-world failure. include,
a, mx, ptr, exists and redirect each cost
one DNS lookup, and so does every such term inside every included record. This tool counts the terms
in the record you paste, but it cannot fetch the included records, so a total under 10 here is a
lower bound. Paste each included domain's record as well to add them up.
DMARC
The record must start with v=DMARC1 and must have a p= policy. The checker
explains each tag, flags invalid values, and warns when there is no rua address, because
without aggregate reports there is no way to see which services send as your domain before tightening
the policy.
DKIM
The public key in p= is decoded as a DER SubjectPublicKeyInfo, the same structure a
certificate uses, to measure the key. RFC 8301 (2018) says verifiers must not accept RSA keys under
1024 bits and signers should use at least 2048. An empty p= means the key has been
revoked on purpose.
A worked example
The three example records above are what many small businesses end up with:
- The SPF record includes two sending services and one fixed address and ends in
~all. It passes syntax, with two lookups visible here, but each include pulls in more lookups that must also be counted, and one provider's include can cost several lookups on its own. - The DMARC record is
p=nonewith anruaaddress. That is the correct first step, not a finished setup: failing mail is still delivered. After a few weeks of reports show every legitimate source passing, move top=quarantineand thenp=reject. - The DKIM key is 1024-bit RSA. It still verifies everywhere, but should be rotated to 2048 bits: publish a new selector with the new key, switch the sending service to it, and remove the old selector once mail signed with it has stopped arriving.
A sensible order for setting this up
- List every service that sends mail as your domain: mailbox provider, website contact forms, newsletter platform, invoicing, helpdesk.
- Publish one SPF record covering them all, ending in
~all. - Turn on DKIM signing in each service and publish each selector it gives you.
- Publish DMARC with
p=noneand anruaaddress, and read the reports. - Move to
quarantine, thenreject, once everything legitimate passes.
What this checker cannot see
It reads records you paste and cannot query DNS, so it cannot follow include or
redirect, confirm that a record is really published at the right name, or check that a
report address on another domain has authorised your reports. It also checks the records alone, not
real messages: a DKIM key can be perfect while the sending service is not actually signing with it.
To check a live message, look at the Authentication-Results header of an email you have
received from the domain.
Common questions
Where do I find my DKIM selector?
Open any email your domain has sent, view the original message or full headers, and find the DKIM-Signature header. The s= value is the selector and d= is the domain; the key lives at <selector>._domainkey.<domain>. Each sending service (your mailbox provider, newsletter tool, helpdesk) usually has its own selector.
Should SPF end in ~all or -all?
Both are defensible. -all is stricter, but some receivers reject mail on an SPF fail before they evaluate DMARC, which can bounce legitimate forwarded mail. Many operators therefore publish ~all and let a DMARC policy of quarantine or reject do the enforcing. What is never right is +all, and ?all gives no protection.
I have two SPF records because two services each told me to add one. What now?
Merge them. A domain may have only one v=spf1 record; with two, receivers return a permanent error and SPF fails for everything. Take the mechanisms from both (usually include: entries), put them in one record, and keep a single all at the end, for example v=spf1 include:first.example include:second.example ~all.
How long does a change to these records take to work?
As long as the old record's TTL, the number printed by dig after the name (3600 means an hour). Resolvers that cached the old record keep using it until then. Lower the TTL a day before a planned change if you want the switch to be quick.
Does passing SPF, DKIM and DMARC mean my mail will reach the inbox?
No. Authentication proves the mail really came from your domain; it says nothing about whether recipients want it. Reputation, complaint rates, content and sending patterns decide inbox placement. But since 2024 Gmail and Yahoo require SPF, DKIM and a DMARC record from anyone sending in bulk, so without authentication the answer is increasingly no.