If you use Microsoft 365, your emails go out through Exchange Online – but without the right DNS records anyone can forge your sender address. This guide shows how to set up DMARC for Microsoft 365: first SPF and DKIM, then the DMARC record and finally the safe path to p=reject.
At your DNS provider, add a TXT record on the domain itself, for example v=spf1 include:spf.protection.outlook.com -all. If there already is an SPF record, only add the include: – there may only be one SPF record per domain. If other services send in your name, they belong in the same record. Keep an eye on the limit of ten DNS lookups; more in the guide SPF: fix too many DNS lookups.
This step is forgotten most often. Without your own setup, Microsoft only signs your emails with the domain yourcompany.onmicrosoft.com. The signature then does not match your sender domain and does not help with DMARC.
How to enable DKIM for your own domain:
selector1._domainkey and selector2._domainkey. Copy the targets exactly as they appear in the portal – for newer domains they end in dkim.mail.microsoft.If the portal reports that the records do not exist, they usually have not propagated yet. The DNS magnifier shows whether Google and Cloudflare already know them. Microsoft describes the details in its DKIM guide.
Good to know: many DNS providers append the domain name automatically. Then enter only selector1._domainkey as host – otherwise you end up with a doubled name such as selector1._domainkey.your-domain.com.your-domain.com.
You do not enter DMARC in Microsoft 365 but at your DNS provider: as a TXT record with the host _dmarc. To start, use v=DMARC1; p=none; rua=mailto:reports@your-domain.com. With p=none nothing changes in delivery yet, but receivers send you daily reports on who sends in your name.
These reports are XML files and hardly readable without a tool. Mailsecurity24 analyses them for you and shows clearly which services pass and where something is still missing. We recognise Microsoft 365 automatically.
Only when all your services pass SPF or DKIM aligned with the sender domain do you tighten to p=quarantine and later to p=reject. Then forged emails in your name are rejected. Typical pitfalls are newsletter and CRM systems, scanners and copiers sending through your mail server, and invoicing or ticket systems with their own sender address.
The DMARC automation of Mailsecurity24 takes this decision off your hands: you set one reference once, and protection is tightened step by step – only when all services pass.
Microsoft manages the yourcompany.onmicrosoft.com domain itself. You can add a DMARC record for it in the Microsoft 365 admin center under the settings of this domain. If you do not send email through it, that is a simple additional protection.
Free check · no sign-up
Check in seconds whether your domain is protected against email spoofing – or whether an email really comes from the stated sender.
Send any email to a one-time address – we show in seconds whether SPF, DKIM and DMARC passed. With a report and stamp.
Send any email from the address you want to check to:
Yes, for every custom domain. Without enabling it, Microsoft only signs with the onmicrosoft.com domain, and that signature does not count for DMARC of your own domain.
Usually include:spf.protection.outlook.com in your existing SPF record, for example v=spf1 include:spf.protection.outlook.com -all.
At your DNS provider as a TXT record with the host _dmarc – not in the Microsoft portal. Only for the onmicrosoft.com domain is this done in the admin center.
Once the DMARC reports show over several weeks that all your services pass SPF or DKIM aligned. Before that, p=reject can block genuine emails.
Try Mailsecurity24 free for 14 days. No payment details required.
