Skip to content

DMARC Alignment Explained: Relaxed vs Strict

Why mail can pass SPF and DKIM and still fail DMARC. How identifier alignment works and when to choose relaxed or strict.

Published 7 min read

DMARC alignment is the check that the domain authenticated by SPF or DKIM matches the domain in the visible From: header. A message passes DMARC only if at least one of them passes and aligns. In relaxed mode (the default) the domains only need to share the same organizational domain, so mail.example.com aligns with example.com. In strict mode they must be identical. This is why a message can show spf=pass and dkim=pass and still fail DMARC.

Why alignment exists

SPF and DKIM were designed before DMARC and authenticate domains the recipient never sees.

  • SPF (RFC 7208) authorizes the IP address for the envelope sender, the MAIL FROM domain used in the SMTP conversation. It usually ends up in the Return-Path header.
  • DKIM (RFC 6376) verifies a signature made by the domain in the signature's d= tag.

Neither checks the From: header, which is the address mail clients display. Without alignment, an attacker can pass SPF for their own domain while showing yours in the From line. DMARC ties the two together by requiring that the authenticated domain match the From domain.

The three domains in every message

Here is a typical message sent by a newsletter platform on behalf of example.com:

Return-Path: <bounce-123@mail.vendor.example>
DKIM-Signature: v=1; a=rsa-sha256; d=vendor.example; s=k1; ...
From: Example News <news@example.com>
Identifier Where it comes from Domain
From domain (what DMARC protects) From: header example.com
SPF domain MAIL FROM / Return-Path mail.vendor.example
DKIM domain d= in DKIM-Signature vendor.example

The receiver's result:

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

Both SPF and DKIM pass, but for the vendor's domains. Neither aligns with example.com, so DMARC fails. Under p=reject, this legitimate newsletter would bounce.

Relaxed vs strict alignment

The DMARC record sets the mode separately for each mechanism:

  • adkim for DKIM, r (relaxed) or s (strict). Default r.
  • aspf for SPF, r or s. Default r.
_dmarc.example.com.  IN  TXT  "v=DMARC1; p=reject; adkim=s; aspf=r; rua=mailto:dmarc@example.com"

Relaxed alignment

The authenticated domain and the From domain must have the same organizational domain. The organizational domain is the registered domain: example.com for news.example.com, and example.co.uk for shop.example.co.uk.

Strict alignment

The two domains must be exactly the same, compared without regard to case.

Comparison table

From domain example.com:

Authenticated domain Relaxed Strict
example.com Aligned Aligned
mail.example.com Aligned Not aligned
bounces.news.example.com Aligned Not aligned
example.net Not aligned Not aligned
example.com.vendor.example Not aligned Not aligned

From domain news.example.com:

Authenticated domain Relaxed Strict
example.com Aligned Not aligned
news.example.com Aligned Aligned
other.example.com Aligned Not aligned

Relaxed alignment works in both directions within the same organizational domain: a parent, a child or a sibling all align.

How is the organizational domain determined?

Under RFC 7489, receivers used a public suffix list to find it. The revised specification, RFC 9989 (published May 2026), replaces that with a DNS tree walk: the receiver queries _dmarc records up the DNS hierarchy and picks the organizational domain from what it finds, with a new psd tag that lets domains declare whether they are a public suffix. For ordinary domains like example.com or example.co.uk, the result is the same.

Should I use relaxed or strict alignment?

Use relaxed unless you have a specific reason not to. RFC 9989 notes that relaxed mode is almost always sufficient in practice.

Relaxed is the right choice when:

  • Vendors use subdomains you delegate to them, such as bounce.example.com or em1234.example.com.
  • You send from several subdomains and sign with the parent domain, or the reverse.

Strict can make sense when:

  • Different subdomains are run by different teams or vendors with different trust levels, and you do not want a signature from marketing.example.com to vouch for mail from example.com.
  • You have confirmed from reports that every legitimate source already passes with an exact domain match.

A common setup is adkim=r; aspf=r everywhere. Some organizations use adkim=s with aspf=r once all DKIM signatures use the exact From domain. Switching to strict without checking reports is a frequent cause of sudden failures.

SPF alignment in practice

SPF aligns when the MAIL FROM domain matches the From domain. Your own mail servers usually do this automatically. Third-party platforms usually do not, because they set their own bounce domain to process bounces.

To fix it, use the vendor's custom return path (also called custom bounce domain or envelope domain). You publish a record such as:

bounce.example.com.  IN  CNAME  bounces.vendor.example.

The vendor then sends with MAIL FROM:<...@bounce.example.com>. Under relaxed alignment, bounce.example.com aligns with example.com, and SPF for that subdomain resolves to the vendor's record.

Limitations of SPF alignment:

  • Forwarding breaks it. A forwarder sends from its own IP, which your SPF record does not authorize.
  • The 10 DNS lookup limit. Too many includes cause a permanent error, and SPF stops passing at all. See SPF records explained and test yours with the SPF checker.

DKIM alignment in practice

DKIM aligns when the d= domain of a passing signature matches the From domain. Most platforms sign with their own domain by default and switch to yours once you add the selector records they provide:

k1._domainkey.example.com.  IN  CNAME  k1.dkim.vendor.example.

After setup, signatures carry d=example.com, and DKIM aligns.

A message can carry several DKIM signatures. DMARC passes if any one passing signature aligns. It is normal to see one signature from the vendor (d=vendor.example) and one from you (d=example.com).

DKIM is the more reliable path to DMARC because the signature travels with the message and usually survives forwarding, as long as the signed headers and body are not modified. Learn more in what is DKIM and check your selectors with the DKIM checker.

Why does my email pass SPF and DKIM but fail DMARC?

Because neither passing domain is aligned with the From domain. The usual causes:

  1. A third-party sender using its own domains for both the return path and the DKIM signature.
  2. Strict mode with subdomains. adkim=s with d=mail.example.com and From: example.com fails alignment.
  3. A different registered domain. Signing with example-mail.com when the From is example.com never aligns, even in relaxed mode.
  4. The aligned mechanism failed. SPF passed for the vendor's bounce domain while your own DKIM signature failed, for example because a mailing list modified the body.

Look at the Authentication-Results header or your aggregate reports, where each record shows the SPF and DKIM domains next to the header_from. The aggregate reports guide shows where to find these fields.

Do both SPF and DKIM need to align?

No. One aligned pass is enough. Aim for both where possible: DKIM covers forwarding, SPF covers the occasional message that a system sends without a signature.

Worked example: fixing a help desk

Reports for example.com show 1,800 messages a month from a help desk platform, all failing DMARC:

header_from SPF domain SPF DKIM domain DKIM DMARC
example.com helpdesk.vendor.example pass helpdesk.vendor.example pass fail

Fix:

  1. In the help desk's settings, add example.com as a sending domain.
  2. Publish the two DKIM CNAMEs it provides at hd1._domainkey.example.com and hd2._domainkey.example.com.
  3. Optionally publish its return path CNAME at support-bounce.example.com.

Next week's report:

header_from SPF domain SPF DKIM domain DKIM DMARC
example.com support-bounce.example.com pass example.com pass pass

Both now align under relaxed mode. Under adkim=s, DKIM still aligns (exact match), and under aspf=s, SPF would not.

Common mistakes

  • Setting aspf=s while vendors use bounce subdomains. SPF alignment fails everywhere a subdomain return path is used.
  • Trusting spf=pass alone. It says nothing about the From domain.
  • Only fixing SPF. Forwarded mail will still fail. Add aligned DKIM.
  • Lookalike sending domains. example-mail.com is a different organizational domain and never aligns with example.com.
  • Forgetting that subdomains with their own DMARC records use their own adkim and aspf values.

Key takeaways

  • Alignment compares the SPF or DKIM domain with the From: header domain.
  • DMARC passes if at least one mechanism passes and aligns.
  • Relaxed (r, the default) needs the same organizational domain. Strict (s) needs an exact match.
  • Fix third-party senders with a custom DKIM domain first, and a custom return path second.
  • Stay on relaxed unless reports show strict is safe and you need it.

Check your record's adkim and aspf settings with the DMARC checker.

Check your domain now