DMARC fails but SPF and DKIM pass: alignment explained

Why SPF and DKIM can pass while DMARC fails, how to spot it in the headers, and the settings that fix it.

Some links on this page are affiliate links. If you sign up through one, Rigcheck may earn a commission at no cost to you. It doesn't change what this guide recommends. How we handle this.

You opened a message's headers, or a DMARC report, and found something that looks impossible:

spf=pass
dkim=pass
dmarc=fail

It isn't a bug. SPF and DKIM each check a domain, and it isn't always yours. DMARC only counts a pass when it's for the same domain your recipients see in the From address. That rule is called alignment, and it's the most common reason legitimate mail fails DMARC.

This guide shows how to spot it in the headers and the settings that fix it. Usually that means one setting in the service that sent the message, not a change to your SPF record.

Check your records first. Rigcheck shows whether your domain publishes SPF, DKIM and DMARC, and gives you the exact record for anything missing.

What DMARC actually checks

A message passes DMARC when at least one of these is true:

  • SPF passes, and the domain SPF checked matches the From domain.
  • DKIM passes, and the domain in the DKIM signature matches the From domain.

Each of the three checks looks at a different domain, and each shows up in a different place in the headers:

CheckDomain it looks atWhere you see it
SPFThe hidden bounce address (Return-Path, or envelope sender)smtp.mailfrom=
DKIMThe signing domain, the d= tag in the signatureheader.d=
DMARCThe From address your recipients seeheader.from=

When a service sends for you, it often uses its own domain for the bounce address and the signature until you set it up otherwise. SPF and DKIM then pass for the service, and neither one counts for you.

Find the mismatch in your headers

Look for the Authentication-Results line in the message's headers. In Gmail, open the message, tap the three-dot menu and choose Show original. In Outlook, open the message and choose View, then View message source (or, in the classic app, File, then Properties). Here's a typical failing message:

Authentication-Results: mx.example.net;
 spf=pass smtp.mailfrom=bounces.mailservice.example;
 dkim=pass header.d=mailservice.example;
 dmarc=fail header.from=yourdomain.com

Compare each domain with header.from:

  • bounces.mailservice.example isn't yourdomain.com, so SPF's pass doesn't count.
  • mailservice.example isn't yourdomain.com, so DKIM's pass doesn't count.
  • Neither aligned pass is there, so DMARC fails.

A message can carry more than one DKIM signature. One signature with header.d= your domain is enough, even if the service also adds its own.

Rather not compare the domains by hand? Paste the headers into the email header analyzer. It shows which domain each check passed for and whether it aligns, and the headers never leave your browser.

In DMARC reports

Aggregate reports show the same thing in two parts. auth_results holds the plain SPF and DKIM results, for whatever domain each checked. policy_evaluated holds the results DMARC used, which only pass when they align. A source with pass under auth_results and fail under policy_evaluated has this problem. Most DMARC reporting tools show it as "not aligned".

Relaxed and strict alignment

"Matches" has two settings. By default, alignment is relaxed: the two domains only need to share the same organizational domain, the name you registered. A subdomain of yours counts. Strict alignment needs the exact same name.

From domainDomain SPF or DKIM passed forRelaxedStrict
yourdomain.comyourdomain.comAlignedAligned
yourdomain.combounces.yourdomain.comAlignedNot aligned
news.yourdomain.comyourdomain.comAlignedNot aligned
yourdomain.comyourdomain.netNot alignedNot aligned
yourdomain.commailservice.exampleNot alignedNot aligned

Your DMARC record picks the setting: aspf= for SPF and adkim= for DKIM, each r (relaxed) or s (strict). Leave them out and both are relaxed, which is right for almost every domain. As of November 2026, the DMARC standard is RFC 9989, which replaced RFC 7489. It changed how receivers work out the organizational domain, but for an ordinary domain like yourdomain.com the answer is the same.

How to fix it

You only need one aligned pass, but aim for DKIM first: it's the one that survives forwarding.

Step 1: Turn on DKIM for your own domain in the sending service

Find the service that sent the failing message. The header.d= or smtp.mailfrom= domain usually names it. In its settings, look for domain authentication, sender authentication or DKIM, add the DNS records it gives you, and finish its verify step. Once it signs as your domain, the signature changes from this:

DKIM-Signature: v=1; a=rsa-sha256; d=mailservice.example; s=s1; ...

to this:

DKIM-Signature: v=1; a=rsa-sha256; d=yourdomain.com; s=s1; ...

and DMARC passes. Setup guides for the most common services: Google Workspace, Microsoft 365, Mailchimp, SendGrid, Amazon SES, and the rest. If you're not sure which selector a service uses, DKIM selectors explained lists the common ones.

Step 2: Set up a custom bounce domain, so SPF aligns too

Outlook.com, among others, wants SPF to pass as well (see Fixing Outlook 550 5.7.515), and an aligned SPF pass is a backup if a DKIM key is ever wrong. Most services offer a custom Return-Path, bounce domain or MAIL FROM domain. You add a record on a subdomain of yours that points at the service, and the service starts using it as the bounce address:

Hostbounces
TypeCNAME
ValueThe target your sending service gives you

The subdomain name and the record type vary by service: some ask for a CNAME, others for MX and TXT records. Use exactly what your service shows. SPF is then checked against bounces.yourdomain.com, which the service manages, and it aligns with yourdomain.com under relaxed alignment.

Step 3: Check for strict alignment you didn't mean to set

If the failing message passed for a subdomain of yours, like bounces.yourdomain.com, look at your DMARC record for aspf=s or adkim=s. Strict alignment turns those near-matches into failures. Unless you chose strict on purpose, remove both tags and keep the rest of the record as it is. For example, change this:

v=DMARC1; p=quarantine; adkim=s; aspf=s; rua=mailto:dmarc@yourdomain.com

to this:

Host_dmarc
TypeTXT
Valuev=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com

Keep your own p= policy and reporting address; only the two tags go.

Other reasons for an alignment failure

  • The service is set up for a different domain. You verified yourdomain.net in the service but send with a From address at yourdomain.com. Different registered names never align. Authenticate the domain you actually send from.
  • Forwarding. When a message is forwarded, the forwarding server becomes the sender, so SPF usually fails or passes for the forwarder. DKIM normally survives, which is why Step 1 matters most.
  • Mailing lists. A list that adds a footer or changes the subject breaks the DKIM signature. Most modern list software rewrites the From address to the list's own domain to avoid this.

When your sending tool can't authenticate as your domain

Some older tools, scripts and website plugins send through a server that can't sign as your domain or use your bounce address. However you edit DNS, their mail can't align. The fix is to send that mail through a service that supports both.

After the fix

  1. Run your domain through the Rigcheck checker and confirm SPF, DKIM and DMARC are in place. If you just added records, give DNS time to update: DNS changes not showing up explains how long.
  2. Send a new test from the service that failed and open its headers. Look for header.d= your domain, or smtp.mailfrom= a subdomain of yours, and dmarc=pass.
  3. Over the next few days, check your DMARC reports: that source should now show a pass under policy_evaluated.

Questions people ask

Do SPF and DKIM both need to align?

Not for DMARC: one aligned pass is enough. Some mailbox providers, like Outlook.com for bulk senders, ask for both SPF and DKIM to pass on top of DMARC, so setting up both is the safe choice.

Should I switch to strict alignment for extra security?

Usually not. Relaxed alignment still requires a domain you control, and strict breaks the common setup where a service uses a subdomain of yours for bounces.

DMARC is at p=none. Does an alignment failure matter?

At p=none the message is still delivered, but it's still counted as a DMARC failure, and some providers look at that when filtering. Fix it before you move to quarantine or reject, or that mail will go to spam or bounce. DMARC p=none vs quarantine vs reject covers the rollout.

Check your domain now. See whether SPF, DKIM and DMARC are in place and get the exact record for anything missing.

Check my setup

Browse all guides