Why are my emails going to spam? SPF, DKIM and DMARC in Microsoft 365

If customers say your emails end up in their junk folder, or messages bounce with errors like “554 5.7.1”, the cause is very often your domain’s email authentication. Here is what SPF, DKIM and DMARC do, how to set them up for Microsoft 365 and how to confirm that they work.

Why this matters more than before

Since 2024, Gmail and Yahoo have required senders to authenticate their email, and Microsoft introduced similar rules for Outlook.com in 2025. The strictest rules target high-volume senders, but every business benefits: authenticated mail is trusted more, and a domain without DMARC is easy for criminals to impersonate in phishing emails.

The three records in plain English

Step 1: one correct SPF record

Your domain must have exactly one SPF record. Two separate SPF records is one of the most common mistakes we find, and it makes SPF fail. For a domain that only sends through Microsoft 365, the record looks like this:

v=spf1 include:spf.protection.outlook.com -all

If other services send email for you, add each one to the same record with its own include: value, which the provider publishes in its documentation. SPF allows a maximum of 10 DNS lookups, so remove services you no longer use.

Step 2: turn on DKIM in Microsoft 365

  1. Open the Microsoft Defender portal and go to Email & collaboration → Policies & rules → Threat policies → Email authentication settings → DKIM.
  2. Select your domain. Microsoft shows two CNAME records (selector1 and selector2).
  3. Create both CNAME records at your DNS provider, copying the exact values shown in the portal.
  4. Wait for the records to propagate, which can take a few hours, then return to the portal and enable DKIM signing for the domain.

Until you enable DKIM for your own domain, Microsoft signs with its default onmicrosoft.com domain, which does not align with your address and does not help DMARC.

Step 3: publish DMARC in stages

Create a TXT record named _dmarc on your domain. Start in monitoring mode, so nothing legitimate is blocked while you check the results:

v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com

After a few weeks, once your legitimate services pass, move to p=quarantine and later to p=reject. Going straight to reject is how businesses accidentally block their own invoices or newsletters.

How to check that it works

Send an email from your Microsoft 365 mailbox to a Gmail account, open it and choose Show original. You want to see PASS for SPF, DKIM and DMARC. In Outlook, the same information appears in the message headers under Authentication-Results.

A real example

A law firm we support had its messages to a professional association rejected with a 554 5.7.1 spam error. SPF was already correct, so the gap was DKIM and DMARC. We published the DKIM records, enabled signing in Microsoft 365 and added a DMARC record, then checked the headers on test messages.

Common mistakes

WhatsApp