Overview per mail provider

Microsoft 365: set up and check SPF, DKIM, DMARC and MX

Everything a domain needs in DNS for mailboxes at Microsoft 365 on one page: the values Microsoft 365 specifies, what to switch on in the Microsoft 365 admin interface, the most common mistake and a step-by-step guide per record. The email check tests your domain right here.

Guides for Microsoft 365

Email check for Microsoft 365

The email check tests in one run whether the domain’s MX, SPF, DKIM and DMARC match Microsoft 365 and shows what to do for every finding.

Microsoft 365: what you should know

Microsoft 365 (Exchange Online) needs four things in DNS for a custom domain: one MX record to your own host under mail.protection.outlook.com, the SPF record with include:spf.protection.outlook.com, two CNAME records for DKIM and a DMARC record. The setup wizard in the admin center lists the first two, but not DKIM and DMARC.

That is exactly the gap in many tenants: for custom domains Microsoft 365 does not DKIM-sign outgoing mail until someone switches it on. Only senders of the onmicrosoft.com domain are signed automatically. DKIM is enabled in the Microsoft Defender portal, and DMARC exists in no portal at all: you create the record yourself at the DNS host.

The domain must be added in the Microsoft 365 admin center and verified through the TXT record shown there.

The values for Microsoft 365 at a glance

The records Microsoft 365 expects for a custom domain; the guides above cover the details.

  • MX: 0 example-com.mail.protection.outlook.com
  • SPF: v=spf1 include:spf.protection.outlook.com -all
  • DKIM: Microsoft 365 uses two selectors, selector1 and selector2, and publishes the keys on its side rather than yours: you create two CNAME records pointing to Microsoft. That lets Microsoft swap keys without you touching DNS; only one of the two selectors is active at a time.
  • DMARC: For custom domains Microsoft 365 has no portal and no switch for DMARC: the record is a TXT record at _dmarc that you create at the DNS host. Microsoft recommends starting with p=none and a reporting address, then p=quarantine with a rising pct value and finally p=reject, subdomains first and the parent domain last.

Where to create the records

Microsoft 365 specifies the values; they are created at the domain’s DNS host, the place the name servers point to. The guides by host show the way to the DNS editor of IONOS, STRATO, Hetzner, Cloudflare and other providers.

Frequently asked questions

Which DNS records does Microsoft 365 need for a custom domain?
MX for receiving, SPF and DKIM for sending and DMARC as the policy for both. The domain must be added in the Microsoft 365 admin center and verified through the TXT record shown there.
What goes wrong most often with Microsoft 365?
The two DKIM CNAMEs exist, but the toggle in the Defender portal stays off. Microsoft 365 then does not sign the domain’s mail, and DMARC depends on SPF alone, which breaks on forwarding. After creating the CNAMEs, enable signing for the domain in the Defender portal and check it in the DKIM checker with selector1.
How do I check whether my domain is set up correctly for Microsoft 365?
With the email check on this page: it shows MX, SPF, DKIM and DMARC with a rating and recommendation. So that nothing changes unnoticed, DomainWarn then keeps checking the domain.

All hosts at a glance

DomainWarn checks SPF, DKIM, DMARC, DNS and certificates of all client domains regularly and reports changes before mail lands in spam.

Monitor this domain continuously14-day free trial, no credit card.

Other mail providers

All mail providers at a glance