Last updated: November 2026
Disclosure: WavesRank is reader-supported. Some links on this site may be affiliate links, which means we may earn a commission at no extra cost to you. The steps below follow Microsoft’s own documentation on Microsoft Learn, checked in November 2026. See our Affiliate Disclosure and Editorial Policy.
If your business sends email through Microsoft 365 using your own domain, you need three DNS records to prove that email is really from you: SPF, DKIM and DMARC. Microsoft 365 does not set up DKIM for your own domain automatically, so many small businesses have only part of the job done.
This guide walks through all three in Microsoft 365, with the exact records and the current admin portal steps.
Quick answer
- SPF: TXT record at
@:v=spf1 include:spf.protection.outlook.com -all(add other senders to the same record). - DKIM: Microsoft Defender portal > Email & collaboration > Policies & rules > Threat policies > Email authentication settings > DKIM. Create the keys, add the two CNAME records Microsoft shows you, then turn signing on.
- DMARC: TXT record at
_dmarc: start withv=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com, then move to quarantine and reject. - Also: add
v=DMARC1; p=rejectto youronmicrosoft.comdomain in the Microsoft 365 admin center.
Why Microsoft 365 users need to do this
- DKIM is off for your own domain until you turn it on. Microsoft signs mail for your
onmicrosoft.comdomain automatically, but according to Microsoft, no DKIM signing happens for custom domains until you complete the setup. - Big mailbox providers now require it. Gmail requires SPF or DKIM for all senders, and SPF, DKIM and DMARC for bulk senders. Outlook.com has introduced similar rules for high-volume senders.
- It stops spoofing. Without DMARC, anyone can send email that appears to come from your domain. See how to stop email spoofing.
Before you start
- Admin access to the Microsoft 365 admin center and the Microsoft Defender portal (security.microsoft.com).
- DNS access for your domain (for example GoDaddy, Cloudflare or your web host).
- A list of everything that sends email as your domain: Microsoft 365, your website forms, newsletter tool, invoicing software, CRM, scanners. Each one must pass SPF or DKIM before you enforce DMARC.
Step 1: Check or set up SPF
When you added your domain to Microsoft 365, the setup wizard probably asked you to add an SPF record. Check it exists and is correct:
| Type | Host / Name | Value |
|---|---|---|
| TXT | @ |
v=spf1 include:spf.protection.outlook.com -all |
- Other senders: add their
include:to the same record, for examplev=spf1 include:spf.protection.outlook.com include:sendgrid.net -all. - Only one SPF record per domain. Two records break SPF.
-allor~all?-all(hard fail) is the usual choice once you are sure every sender is listed. If you are still finding senders, start with~alland tighten it later.
Step 2: Turn on DKIM for your domain
- Open the Microsoft Defender portal and go to Email & collaboration > Policies & rules > Threat policies > Email authentication settings, then the DKIM tab. (You can also go straight to security.microsoft.com/authentication.)
- Find your domain. Its status should show NoDKIMKeys. Turn on the toggle, or open the domain and select Create DKIM keys.
- An error message appears showing the CNAME values. This is expected. Select OK.
- The status changes to CnameMissing. Click the domain’s row (not the toggle) to open its details and copy the two values under Publish CNAMEs.
- At your DNS host, create two CNAME records:
Type Host / Name Points to CNAME selector1._domainkeyThe selector1 value Microsoft shows you CNAME selector2._domainkeyThe selector2 value Microsoft shows you Copy the values exactly from the portal. Newer domains use values ending in
dkim.mail.microsoft; older ones end inonmicrosoft.com. Do not copy an example from another website. - Wait for DNS to update (minutes to a few hours), then return to the domain’s details and turn on Sign messages for this domain with DKIM signatures. The status should change to Signing DKIM signatures for this domain.
Key size: the portal creates 1024-bit keys. Microsoft documents how to create or rotate to 2048-bit keys with Exchange Online PowerShell (New-DkimSigningConfig with -KeySize 2048, or Rotate-DkimSigningConfig for an existing domain). An IT provider can do this in a few minutes.
Step 3: Add your DMARC record
First, create a dedicated mailbox or Microsoft 365 group for DMARC reports. Microsoft advises against using an individual user’s mailbox because reports can arrive in large numbers. A DMARC reporting tool can also receive them for you; see our DMARC tools comparison.
Then add this record at your DNS host:
| Type | Host / Name | Value |
|---|---|---|
| TXT | _dmarc |
v=DMARC1; p=none; pct=100; rua=mailto:dmarc-reports@yourdomain.com |
p=none only monitors; nothing is blocked. Reports start arriving within a day or two, showing every service sending as your domain.
Step 4: Move to quarantine, then reject
Microsoft recommends a gradual rollout rather than jumping straight to reject. When the reports show every legitimate sender passing:
- Quarantine:
v=DMARC1; p=quarantine; pct=10; rua=mailto:dmarc-reports@yourdomain.com, then raisepctthrough 25, 50, 75 and 100 while watching the reports. - Reject:
v=DMARC1; p=reject; pct=100; rua=mailto:dmarc-reports@yourdomain.com, which is Microsoft’s end goal for custom domains.
Not sure what each policy does? See DMARC policy: none, quarantine or reject.
Step 5: Protect your onmicrosoft.com domain
Every Microsoft 365 tenant has a domain like yourcompany.onmicrosoft.com. Microsoft recommends a DMARC record on it too, so nobody can spoof it:
- In the Microsoft 365 admin center, go to Settings > Domains and select your
onmicrosoft.comdomain. - Open DNS records and select Add record.
- Type: TXT; TXT name:
_dmarc; TXT value:v=DMARC1; p=reject. Save.
Do the same at your registrar for any parked domains you own but never send email from.
How to check it is working
- Send an email from Outlook to a Gmail or Outlook.com address you control.
- Open the message headers (in Gmail: three dots > Show original).
- Look for SPF: PASS, DKIM: PASS with your own domain, and DMARC: PASS.
Common problems
| Problem | Likely cause | Fix |
|---|---|---|
| DKIM status stuck on CnameMissing | CNAME typo, or the DNS host added the domain twice | Enter only selector1._domainkey as the host; copy the value exactly |
| DKIM passes but shows onmicrosoft.com, not your domain | Signing not turned on for the custom domain | Turn on “Sign messages for this domain with DKIM signatures” |
| Website or newsletter emails fail DMARC | That service is not in SPF and does not sign with your domain | Add its SPF include and turn on its DKIM for your domain |
| Gmail rejects mail with 550 5.7.26 | Email failed authentication | Check SPF, DKIM and DMARC for the sending service |
| Scanner emails start failing | Scanner uses an outside server or basic sign-in | See scan to email in Microsoft 365 |
Frequently asked questions
Does Microsoft 365 set up DKIM automatically? Only for your onmicrosoft.com domain. For your own domain, you must create the keys and add two CNAME records.
Why two DKIM records? Microsoft uses two selectors so it can rotate keys without breaking email: one is active while the other is ready for the next key.
How long does this take? About 30 minutes of work, plus DNS update time and a week or more of monitoring before you enforce DMARC.
Do I need a paid DMARC tool? Not to publish the records. A tool helps you read the reports and find senders that fail, especially if you use several email services. Compare options in EasyDMARC vs PowerDMARC vs dmarcian.
We use Google Workspace instead. See our Google Workspace guide.
Related guides
- DMARC, SPF and DKIM for Google Workspace
- How to set up DMARC, step by step
- Best DMARC tools for small business
- Microsoft 365 security: 12 settings to turn on
Steps were checked against Microsoft Learn in November 2026. Microsoft renames portal menus from time to time; if a step looks different, open security.microsoft.com/authentication.