SPF vs DKIM vs DMARC: what each one actually checks
SPF checks the sending IP, DKIM checks the signature, DMARC ties both to the From address you see and decides what happens on failure. Here is how they fit together.
You searched for
“spf vs dkim vs dmarc”
Last verified: Sep 26, 2026Published: Sep 26, 2026
Search results love to list SPF, DKIM, and DMARC as a set. That is fine as a headline and useless as a diagnosis. Each protocol answers a different question. Mixing them up is how you end up “fixing SPF” for a problem that was never about the sending IP.
The short version
| Protocol | Question it answers | Where it lives |
|---|---|---|
| SPF | Is this sending IP allowed to use this domain in the envelope? | DNS TXT on the envelope-from domain |
| DKIM | Was this message signed with a key that domain published? | DNS TXT on a selector under the signing domain |
| DMARC | Did SPF or DKIM pass and align with the From header, and what should receivers do if not? | DNS TXT on _dmarc.yourdomain |
Receivers check SPF and DKIM first. DMARC reads those results, applies alignment to the visible From address, then applies your policy (none, quarantine, or reject) and optionally sends you aggregate reports.
If you only need the alignment failure mode in depth, jump to DMARC alignment explained. If you are staring at rua XML, see How to read DMARC reports.
Why email needs authentication at all
SMTP was designed for a trusted network. The protocol does not prove that the person putting From: billing@yourcompany.com on a message is allowed to do that. Without SPF, DKIM, and DMARC, anyone who can open a connection can claim your domain. Phishing campaigns, fake invoices, and CEO-fraud mail all abuse that gap.
Mailbox providers (Gmail, Microsoft, Yahoo, and others) now expect domains that send real volume to authenticate. A missing or broken setup shows up as spam folder placement, soft fails, or hard bounces such as Gmail 550 5.7.26.
Authentication does not replace content filtering or account security. It removes one cheap attack: unauthorized use of your domain name in the From line.
SPF: the guest list for sending IPs
SPF (Sender Policy Framework) is a public list of hosts allowed to send mail that claims a given domain in the SMTP envelope (the Return-Path / Mail-From). The receiving server looks up that domain’s SPF record and asks whether the connecting IP is authorized.
A minimal record looks like:
v=spf1 include:_spf.google.com include:sendgrid.net -all
Mechanisms such as include:, a, mx, ip4:, and ip6: name who is allowed. The final all qualifier (-all, ~all, or ?all) says what to do with everyone else.
Production details that bite
- Forwarding usually breaks SPF. The forwarder’s IP is not on your list, so SPF fails even when the original message was legitimate. That is why DKIM matters for mail that gets forwarded.
- You get one SPF record per domain. Multiple
v=spf1TXT records are invalid. Merge includes into a single record. - There is a hard 10-lookup limit. Too many
include:/a/mx/ptr/existsmechanisms and receivers treat the whole record as a permanent error. See SPF permerror: too many DNS lookups. - SPF does not look at the visible From header. It evaluates the envelope domain. That is why an “SPF pass” can still fail DMARC.
When SPF alone is the wrong fix
If reports show failures from random consumer ISPs, adding another include: will not help. That pattern is usually spoofing. If failures come from a named ESP you just hired, SPF (and DKIM) for that ESP is the fix.
DKIM: a cryptographic signature on the message
DKIM (DomainKeys Identified Mail) attaches a signature to message headers (and usually selected body content). The receiving server fetches your public key from DNS (selector._domainkey.yourdomain) and verifies the signature with public-key cryptography.
You keep a private key in the sending system. DNS publishes the matching public key. If the bits still match at the receiver, the message was signed by someone who held that key, and the signed headers were not altered in transit in a way that breaks the signature.
Production details
- DKIM often survives forwarding because the signature travels with the message. When SPF fails after a forward, an aligned DKIM pass can still satisfy DMARC.
- The
d=domain in the signature is what DMARC cares about for alignment, not merely “a valid signature exists somewhere.” - Selector names matter. Many ESPs give you a DNS name like
s1._domainkey.yourdomainpointing at their key. Publish exactly what they document. - Proxying a DKIM CNAME (common when a DNS proxy is orange-clouded) can break lookups. Keep the DKIM hostname DNS-only unless your DNS host documents otherwise.
- Body length and encoding changes can invalidate signatures if a hop alters the message. That is rarer than missing selectors, but it shows up in broken marketing pipelines.
DMARC: alignment, policy, and reports
DMARC (Domain-based Message Authentication, Reporting, and Conformance) does not replace SPF or DKIM. It decides whether a pass counts for the identity the recipient sees, and what to do when nothing counts.
- Alignment. An SPF or DKIM pass only helps DMARC if the authenticated domain matches the From domain (exact match, or organizational match under relaxed alignment). Details: DMARC alignment explained.
- Policy.
p=nonemonitors.p=quarantineasks receivers to treat failures as spam.p=rejectasks them to refuse the message. Subdomain policy (sp=) can differ from the organizational domain. - Reporting. The
rua=address receives aggregate XML reports so you can see who is sending as you, and whether those sends pass. Optionalruf=forensic reports are separate and often left off for privacy and volume reasons.
A starter monitor record looks like:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com
Remember: pass ≠ aligned pass. That gap is why Gmail’s bulk-sender checks and many “authentication failed” bounces fire even when someone “has SPF set up.”
Policy progression that does not burn you
- Publish SPF + DKIM for every real sender.
- Publish DMARC at
p=nonewithrua=and read reports for days or weeks. - Fix unaligned ESPs and unexpected sources.
- Move to
p=quarantine(sometimes with a percentage viapct=while you gain confidence). - Move to
p=rejectwhen legitimate mail is consistently aligned.
Jumping straight to p=reject without reports is how invoice mail disappears for a week.
How they work together on one message
A healthy path
- Your ESP sends from an authorized IP (SPF pass) and signs with your domain’s key (DKIM pass).
- Both results align with
you@yourdomain.comin the From header. - DMARC sees at least one aligned pass, so the message is authenticated under your policy.
- Aggregate reports later show that source as passing, so you can move from
p=nonetoward enforcement with less guesswork.
Common failure paths
- New SaaS tool: sends as your domain, SPF never got an
include:, DKIM never enabled for your domain. DMARC atp=noneso mail still lands while reports show failures. - Alignment-only failure: ESP SPF/DKIM pass on the ESP’s domain, From shows your brand, DMARC fails. Fix custom DKIM / aligned envelope, not more SPF includes at random.
- Forwarding: SPF fails, aligned DKIM passes, DMARC still passes. Without DKIM, forwarding looks like failure.
- Enforcement too early: policy already
reject, a forgotten CRM starts sending, customers call because messages bounce.
How to check your domain today
- Run the free DMARC checker on your domain.
- Run the SPF checker and DKIM checker for pieces that look wrong.
- Confirm every sending system is represented in SPF and signing DKIM for your domain.
- Publish DMARC at
p=nonewith reporting if you do not have it yet, then read reports before tightening. How to read DMARC reports covers what matters in the XML.
Email Watch ingests those aggregate reports and separates spoofing from your own broken senders in the UI so you are not reading raw XML by hand. It does not send or block mail for you; receivers apply your published DMARC policy.
Run the free check to confirm
Applied the fix above? Run the freeDMARC Checkeragainst your domain and see your grade update in real time.
Run the free check: DMARC CheckerCommon follow-up questions
What are SPF, DKIM, and DMARC?
They are the email authentication records inbox providers look up in DNS. SPF authorizes sending IPs for the envelope domain, DKIM signs the message with a published key, and DMARC checks whether those results align with the From address people see, then applies your policy and can send reports.
Do I need all three, or is SPF enough?
For enforcement and for bulk-sender expectations at major providers, plan on all three. SPF alone breaks when mail is forwarded. DKIM alone does not publish a policy. DMARC connects the checks to the visible From address and adds policy plus reports.
What is the difference between SPF, DKIM, and DMARC in one sentence each?
SPF asks whether the sending IP is allowed for the envelope domain. DKIM asks whether the message was signed with a published key. DMARC asks whether an SPF or DKIM pass aligns with the From header, then applies your policy and can send you reports.
Can SPF or DKIM pass while DMARC still fails?
Yes. That is an alignment failure. The IP or signature is valid for some domain, but that domain is not aligned with the From domain the recipient sees (exact match under strict, same organizational domain under relaxed). DMARC only counts an aligned pass.
Which should I set up first?
Publish SPF and DKIM for every system that sends as your domain, then add a DMARC record at p=none with a reporting address so you can see who is sending. Tighten the policy only after the report picture is clear.
What about domains that never send mail?
Still publish DMARC (often with p=reject) so nobody can spoof them. Empty or parked domains are easy to abuse because nobody is watching their reports.
Do Google and Yahoo require SPF and DKIM for bulk senders?
Major providers have tightened bulk-sender requirements since 2024. If you send meaningful volume to those mailboxes, plan on working SPF and DKIM, a published DMARC record, and aligned authentication for your From domain. Exact thresholds change; check current provider docs for your volume.
Where are SPF, DKIM, and DMARC stored?
All three use DNS TXT records. SPF sits on the envelope domain, DKIM on selector._domainkey.domain, and DMARC on _dmarc.domain.
More guides
DMARC alignment explained: why SPF/DKIM can pass and DMARC still fail
DMARC only counts SPF or DKIM when the authenticated domain matches the From address people see. Here is how alignment works and how to fix a pass that still fails DMARC.
How to read DMARC aggregate (rua) reports
DMARC rua reports are daily XML dumps of who sent as your domain and whether SPF/DKIM aligned. Here is what to look at first, and what to ignore.
Fix Gmail error 550 5.7.26: message does not pass authentication checks
Gmail bounces mail with 550 5.7.26 when SPF and DKIM both fail DMARC alignment. Here's exactly what that means and the record fix that clears it.
Don't want to catch this by hand next time?
Email Watch ingests your DMARC reports daily and flags an authentication failure like this one the day it appears — free for 7 days, no credit card.
Start free trial →