LearnEmail authentication

How SPF, DKIM and DMARC work together

Email authentication is three DNS records working together. SPF lists which servers may send for your domain. DKIM signs each message so a receiver can prove it was not altered. DMARC ties both to the address readers actually see, and tells receivers what to do when neither lines up. Only DMARC carries an instruction.

Written by the SieveGuard team from the checks our own free tools run. Last reviewed .

Three records, three different jobs

They are usually presented as a checklist, which hides the thing worth understanding: each record answers a different question, and only one of them tells the receiver what to do about the answer.

RecordQuestion it answersLives atCarries an instruction?
SPFIs this server allowed to send for this domain?yourdomain.comAdvisory only
DKIMWas this message signed by the domain, and unaltered since?selector._domainkey.yourdomain.comNo
DMARCDoes either of the above line up with the visible From: address?_dmarc.yourdomain.comYes

That last column is the whole point. A receiver seeing an SPF failure has no mandate to do anything about it — SPF’s own qualifiers are a recommendation. DMARC is the only record that says reject this, and it is the only one that concerns itself with the address a human actually reads.

The order they run in

A receiver evaluates all three on the same message, in roughly this order. Understanding the sequence is what makes a failure report legible.

  1. SPF checks the envelope. The connecting IP is compared against the record at the Return-Path domain — which is frequently your ESP’s domain, not yours. Result: pass, fail, softfail, neutral, permerror or temperror.
  2. DKIM verifies the signature. The receiver reads s= and d= from the DKIM-Signature header, fetches the key, and recomputes the hash. Result: pass or fail, per signature — a message can carry several.
  3. DMARC checks alignment, then applies policy. It asks whether an SPF or DKIM pass came from a domain that matches the From: header. If neither does, it applies whatever your record says: nothing, quarantine, or reject.

The step people skip is the third one’s first half. DMARC does not care that SPF passed. It cares that SPF passed for the right domain. That distinction accounts for most confused DMARC reports, and it has its own page.

What a full set looks like

Three records for a domain sending through Google Workspace and one ESP:

yourdomain.com                TXT   "v=spf1 include:_spf.google.com include:sendgrid.net ~all"
google._domainkey.yourdomain.com   TXT   "v=DKIM1; k=rsa; p=MIIBIjANBg…"
s1._domainkey.yourdomain.com       CNAME s1.domainkey.u123.wl.sendgrid.net
_dmarc.yourdomain.com              TXT   "v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"

One SPF record covering both senders, one DKIM key per sender, one DMARC policy for the domain. That shape does not change as you add senders — you add an include: and a selector, never a second SPF or DMARC record.

What Gmail and Yahoo now require

In February 2024 Gmail and Yahoo made authentication a condition of delivery rather than a ranking signal. The requirements differ by volume, and the threshold is per-day, not per-campaign.

RequirementUnder 5,000/day5,000+/day
SPF or DKIMRequiredRequired
SPF and DKIM bothRequired
DMARC record publishedRequired (p=none is enough)
Alignment with the From: domainRequired
One-click unsubscribe (RFC 8058)Required
Spam complaint rateBelow 0.3%Below 0.3%
Valid forward and reverse DNS on the sending IPRequiredRequired
TLS on the connectionRequiredRequired

Two things people miss. The 5,000 threshold counts messages to that provider, per day, from your domain — so one large campaign puts you in the strict tier for that day. And the complaint-rate ceiling is not an authentication requirement at all; it is a reputation one, which is why getting the records right is necessary and not sufficient.

Which one is failing?

Symptom to record, for the common cases:

What you seeUsuallyWhere to look
Mail fine directly, fails when forwardedSPF — forwarding changes the connecting IPDKIM
One sending service fails, the rest passThat service’s DKIM key was rotated, or its include was droppedSelectors
Everything failed at once, overnight, no change madeSPF crossed the 10-lookup limit when a provider changed their recordLookup limit
SPF passes, DMARC failsAlignment — SPF passed for the ESP’s domain, not yoursAlignment
Reports show sources you do not recogniseEither spoofing, or a forgotten internal senderDMARC

The order to fix them in

1. SPF first, because it is the cheapest to get wrong

One record, one line, and the failure modes are structural rather than subtle: a second record, or too many lookups. Both void the whole thing.

2. DKIM next, because DMARC leans on it

DKIM survives forwarding and SPF does not, so a domain that authenticates on DKIM alone is more robust than one that authenticates on SPF alone. If you only have budget for one to be reliable, make it this one.

3. DMARC last, at p=none, and leave it there for a while

Publishing p=none changes nothing about delivery and starts the aggregate reports flowing. Those reports are the only view you will ever get of who is sending as your domain. Read them for a few weeks before touching the policy.

Reversing that order is the classic mistake: p=reject published before the reports have shown you your own forgotten senders, and the invoicing system nobody remembered stops delivering.

Sources

FAQ

Do I need all three, or is one enough?+

For under 5,000 messages a day to Gmail or Yahoo, SPF or DKIM is the stated minimum. Above that, both plus a DMARC record are required. Practically, publish all three regardless — the marginal effort is small and the volume threshold is per day, so a single large campaign can move you into the strict tier without warning.

Which should I set up first?+

SPF, then DKIM, then DMARC at p=none. DMARC last is not optional ordering — it evaluates the other two, so publishing an enforcing policy before they are correct is what causes legitimate mail to stop being delivered.

Can I have more than one SPF or DMARC record?+

No. Exactly one of each per domain. Two SPF records is an automatic permerror that voids SPF entirely, and two DMARC records means the policy is ignored. DKIM is the opposite — several keys is normal and correct, one per sending service.

My mail delivers fine. Do I still need this?+

Delivering today and being protected are different things. Without DMARC at an enforcing policy, anyone can send mail with your domain in the From: line and receivers have no instruction to refuse it. The reputation damage lands on your domain, not theirs.

How long does DNS take to take effect?+

Bounded by the zone TTL, usually minutes and occasionally an hour. If a change has not taken effect after that, the far more likely explanation is that the record was published under the wrong name — check the fully-qualified name your DNS host resolved, not the string you typed into the box.

Does any of this stop my mail landing in spam?+

It removes one reason for it. Authentication is a gate, not a ranking boost — passing does not earn you the inbox, but failing reliably costs it. Once the records are right, the remaining causes are reputation, list quality and engagement.

Check it on a real domain

Free, no signup, DNS-only. Nothing you type leaves the lookup.

More on email authentication