Guides › Mailbox

Microsoft 365 / Exchange Online SPF record & DKIM setup

The exact SPF include for Microsoft 365 / Exchange Online, how many of your 10 DNS lookups it costs right now, and how to turn on DKIM so you pass DMARC.

SPF

If Microsoft 365 / Exchange Online is your only sender, publish this TXT record at your root domain (@):
v=spf1 include:spf.protection.outlook.com ~all

Already have an SPF record? Don't add a second one. Add include:spf.protection.outlook.com before the ~all, or use the SPF merger.

Live lookup cost: 1 lookup

Current record at spf.protection.outlook.com:

v=spf1 ip4:40.92.0.0/15 ip4:40.107.0.0/16 ip4:52.100.0.0/15 ip4:52.102.0.0/16 ip4:52.103.0.0/17 ip4:104.47.0.0/17 ip6:2a01:111:f400::/48 ip6:2a01:111:f403::/49 ip6:2a01:111:f403:8000::/51 ip6:2a01:111:f403:c000::/51 ip6:2a01:111:f403:f000::/52 -all

Measured live from DNS and refreshed daily. Microsoft 365 / Exchange Online can change this at any time, which is exactly why monitoring matters.

DKIM

Two CNAME records, selector1._domainkey and selector2._domainkey, pointing to the values shown in the Microsoft Defender portal (Email authentication settings → DKIM).

DMARC

SPF and DKIM only protect you once DMARC ties them to your visible From: address. If you don't have one yet, start with:

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

Official documentation: Microsoft 365 / Exchange Online docs

Using Microsoft 365 / Exchange Online with another service?

Check that Microsoft 365 / Exchange Online is set up correctly on your domain