DMARC Alignment: Why SPF and DKIM Pass but DMARC Fails

Summary

DMARC alignment checks that the From domain matches the domain authenticated by SPF (the Return-Path) or DKIM (the d= tag). SPF and DKIM can pass for a vendor domain while DMARC alignment fails for yours. Relaxed mode, the default, matches organizational domains; strict requires exact matches. Only one aligned pass is needed, and aligned DKIM is the dependable one. Fix third-party senders with DKIM CNAMEs and a custom Return-Path, then read aggregate reports before enforcing.

Server room aisle with network racks and routed cables, lit by status lights

DMARC alignment is the check that compares the domain in the visible From header with the domain that SPF or DKIM actually authenticated. SPF and DKIM can both return pass while DMARC still fails, because pass only means the check succeeded for some domain, not for yours. Alignment ties that result back to the From domain, and only one aligned pass is needed.

This is the failure mode behind most "everything is green but DMARC fails" tickets. The diagnosis takes a few minutes once you know which two domains to compare.

SPF and DKIM authenticate different domains than the one users see

A message carries at least three identities. The From header is what the recipient sees and what DMARC protects. The envelope sender, also called MAIL FROM or Return-Path, is what SPF evaluates. The d= tag in the DKIM-Signature header is what DKIM verifies.

None of these three is required to match another. A shared sending platform will happily put its own bounce domain in the Return-Path and sign with its own d= domain, and both checks pass for the platform. DMARC then asks whether either of those authenticated domains aligns with your From domain, and the answer is no.

Ordinary SPF and DKIM pass results say nothing about the From domain. Alignment does.

Developer desk with a notebook sketch of two overlapping circles beside a laptop

Relaxed alignment compares organizational domains, strict compares exact strings

Alignment has two modes, set per protocol in the DMARC record. The aspf tag controls SPF alignment and adkim controls DKIM alignment. Both default to r (relaxed) when omitted, per RFC 9989, the May 2026 standard that obsoletes RFC 7489.

Under relaxed alignment, two domains align when they share an Organizational Domain. mail.example.com aligns with example.com. Under strict alignment (s), the domains must be identical, so mail.example.com does not align with example.com.

v=DMARC1; p=none; rua=mailto:dmarc@example.com; adkim=r; aspf=r

A concrete case: your From domain is example.com, and your ESP sets the Return-Path to bounce.example.com after you delegate a CNAME. SPF authenticates bounce.example.com. Relaxed SPF alignment passes. Strict fails.

Start relaxed. Move DKIM to strict only after aggregate reports show that every legitimate sender signs with the exact From domain. SPF strict is rarely worth the breakage.

One aligned pass is enough, and DKIM is the one to rely on

DMARC passes when either SPF or DKIM passes and aligns. You do not need both. If a message carries several DKIM signatures, one aligned and valid signature is sufficient.

This matters because the two mechanisms fail differently. SPF validates the connecting IP against the Return-Path domain, so any forwarding hop that re-sends the message breaks it. A DKIM signature travels inside the message and survives forwarding as long as the signed headers and body are not modified.

The practical rule: treat aligned DKIM as the primary path and aligned SPF as the backup. If a sender can only offer one, make it DKIM with d= set to your domain or a subdomain of it.

Two near-identical brass keys side by side, one offset slightly

Third-party senders fail alignment by default, and the fix is a DNS record

The most common misaligned stream is a vendor sending on your behalf with its own domains. Support desks, billing tools, CRMs and newsletter platforms all do this out of the box. Each one passes SPF and DKIM for the vendor and fails DMARC for you.

The fix is the same in every case and is almost always DNS. Add the DKIM selector records the vendor gives you, usually CNAMEs, so the signature uses d=yourdomain.com. Then set a custom Return-Path domain if the vendor supports it, so SPF aligns as well.

Transactional providers publish this setup as "domain authentication" or "custom return path". The names differ, the mechanism does not.

A short audit checklist for each sender you find in your aggregate reports:

If the answer to the first two is no, that sender is failing DMARC today and only a permissive policy is hiding it.

Subdomain strategy decides how much strict mode costs you

Separating streams by subdomain keeps misalignment local. Marketing on news.example.com, product mail on notify.example.com, and the apex reserved for people. Each subdomain can carry its own DKIM selectors and Return-Path, and a broken vendor setup does not poison the others.

Relaxed alignment lets all of these align with the apex organizational domain, so you do not have to publish separate DMARC records per stream. A subdomain without its own record inherits the policy from the parent record. The sp tag sets a different policy for subdomains, and the np tag from the newer spec covers non-existent subdomains.

Strict mode changes the arithmetic. With adkim=s, a signature from notify.example.com no longer aligns with a From address at example.com. You would have to sign with the exact From domain per stream.

Colour-coded patch cables in a network closet

RFC 9989 replaces the Public Suffix List with a DNS tree walk

The old spec found the Organizational Domain with the Public Suffix List. RFC 9989 does it with a DNS tree walk instead: the receiver queries _dmarc records starting at the Author Domain and moves up the labels, with a cap of eight DNS queries. A record carrying psd=n ends the walk and marks that domain as the Organizational Domain.

For most single-brand domains the result is identical to before. It can differ when a domain sits under a shared or unusual suffix, because the Organizational Domain is now derived from published DMARC records and not from a list maintained elsewhere. Since relaxed alignment is defined in terms of the Organizational Domain, a changed Organizational Domain can change an alignment verdict.

The check that costs nothing: confirm that your _dmarc record exists at the exact organizational level you expect, and that no parent record with psd set interferes.

The headers that tell you which alignment failed

Stop guessing and read the receiver's verdict. In Gmail, open the original message and look at the Authentication-Results header. It lists spf=, dkim= and dmarc= results along with the domains each one evaluated.

Authentication-Results: mx.example.net;
  spf=pass smtp.mailfrom=bounce.vendor-mail.com;
  dkim=pass header.d=vendor-mail.com;
  dmarc=fail header.from=example.com

Here both mechanisms pass and DMARC fails. smtp.mailfrom is vendor-mail.com and header.d is vendor-mail.com, neither of which aligns with example.com. That reads as a vendor configuration problem, and the fix is on the vendor's domain authentication page, not in your DMARC record.

Aggregate reports give you the same evidence at volume. Each row lists the source IP, the count, the SPF and DKIM results, and whether each aligned. Sort by sources with high counts and failed alignment.

Policy enforcement is the reason to fix alignment now

At p=none, a misaligned stream still delivers and nobody notices. At p=quarantine or p=reject, receivers act on the failure. Moving to enforcement with unresolved vendors is how a billing-receipt stream disappears on a Tuesday.

Google's sender guidelines require senders of 5,000 or more messages a day to publish a DMARC record and to align the From domain with the SPF domain or the DKIM domain. The same page tells bulk senders to keep the spam rate in Postmaster Tools below 0.10% and never reach 0.30%. Misaligned mail is the easiest way to lose the reputation margin that rate depends on.

The sequence that works: publish p=none with rua, read two to four weeks of reports, align every legitimate sender, then step to quarantine with pct ramped up, then reject. Nothing about this order is negotiable, because the reports are the only inventory of who sends as you.

SPF lookup limits quietly break SPF alignment

SPF evaluation stops at ten DNS lookups. A domain that includes several vendors through include: mechanisms can exceed that and return permerror, and a permerror is not a pass. If SPF is your only aligned path for some stream, that stream fails DMARC the moment you add the eleventh lookup.

This is another reason to move critical mail to aligned DKIM. A custom Return-Path domain has its own SPF record, which keeps the lookup count off your apex record entirely.

Flattening your apex record is a workaround that needs maintenance every time a vendor changes IP ranges. Moving streams to subdomains with their own records does the same job without the upkeep.

What alignment will not tell you

Alignment says nothing about content, reputation or whether the recipient wants the message. A fully aligned domain with a high complaint rate still lands in spam. It also does not stop display-name spoofing, where the attacker uses a legitimate-looking name on an unrelated domain.

It is a necessary layer, not a deliverability guarantee. What it gives you is an unforgeable link between your From domain and the infrastructure that sent the message, which is the basis for every enforcement decision after it.

Before you move off p=none

Run through this list, in order:

  1. Pull aggregate reports and list every source IP and sending domain.

  2. For each legitimate source, record the SPF domain and the DKIM d= domain.

  3. Fix any source where neither aligns with the From domain.

  4. Confirm DKIM alignment survives your forwarding and mailing-list cases.

  5. Keep SPF under ten lookups with headroom.

  6. Raise the policy one step at a time and watch for new failing sources.

The open question for most teams is the long tail: the one internal service that sends from the apex through a relay nobody remembers. Reports will find it. The only choice is whether that happens before enforcement or after.

Frequently asked questions

What is DMARC alignment?
DMARC alignment checks that the domain in the visible From header matches the domain authenticated by SPF (the Return-Path domain) or by DKIM (the d= domain in the signature). A message passes DMARC when at least one of the two passes and aligns.
Why does DMARC fail when SPF and DKIM both pass?
SPF and DKIM can pass for a different domain than your From domain, typically a vendor's bounce or signing domain. DMARC requires the authenticated domain to align with the From domain, so a pass for the vendor does not count for you.
What is the difference between relaxed and strict alignment?
Relaxed alignment requires the two domains to share an Organizational Domain, so mail.example.com aligns with example.com. Strict alignment requires them to be identical. Both aspf and adkim default to relaxed when omitted.
Do I need both SPF and DKIM to align?
No. DMARC passes if either SPF or DKIM passes and aligns with the From domain. Aligned DKIM is usually the more reliable path because it survives forwarding, while SPF usually breaks when a message is re-sent from a different IP.
How do I fix DMARC alignment for a third-party sender?
Publish the DKIM records the vendor provides, usually CNAMEs, so the signature uses your domain in d=. Then configure a custom Return-Path or bounce domain under your domain so SPF aligns too. Verify with the Authentication-Results header.
Did RFC 9989 change how alignment works?
The relaxed and strict definitions are unchanged. What changed is how the Organizational Domain is found: RFC 9989 uses a DNS tree walk of up to eight queries instead of the Public Suffix List, which can change relaxed alignment results for domains under unusual suffixes.
notificationharbor
Start free