Skip to main content
Enter TitanOS

Email platform guide

Microsoft 365 DKIM Setup (and SPF and DMARC)

Microsoft 365 has no screen for SPF or DMARC records: you publish those at your DNS host. DKIM is the odd one out, because you switch it on in the Defender portal and publish two CNAME records that Microsoft generates for you.

Microsoft 365 is the email platform behind a huge share of Australian small business mail. It signs outbound mail with DKIM only when you turn that on for your own domain, and it will not publish SPF or DMARC for you. Microsoft's own documentation says there are no admin portals or PowerShell cmdlets for managing SPF or DMARC records in custom domains; you create them at your registrar or DNS hosting service.

This page is the one to follow if your mailboxes are Microsoft 365, whoever your registrar is. The registrar pages (GoDaddy, Crazy Domains, VentraIP, Netregistry, Cloudflare) show where to type the values; this page shows what the values are.

What we checked. Read in full on 28 November 2026: Microsoft Learn pages on SPF, DKIM and DMARC configuration for Microsoft 365 (all updated July to August 2026 per their page headers).

Step 1: Work out your domains and where DNS lives

  1. In the Microsoft 365 admin centre, go to Settings, Domains and list every domain and subdomain that sends mail. Each one needs its own SPF record, and each sending domain needs DKIM.
  2. Find out where each domain's DNS is hosted (registrar, web host or Cloudflare). All the records below are published there, not in Microsoft.
  3. Note your initial domain (yourcompany.onmicrosoft.com). Its prefix appears inside the DKIM CNAME values.
  4. If you have domains that do not send mail, plan to lock them down with v=spf1 -all and a reject DMARC record (Microsoft gives both values for parked domains).

The exact host names and values for Microsoft 365

Microsoft documents the host names as the same for every organisation: selector1._domainkey and selector2._domainkey. The targets are not the same for everyone, so never copy them from a blog post, including this one. Take them from the Defender portal or from PowerShell.

Microsoft's current format is selector1-<your-domain-with-dashes>._domainkey.<initial-domain-prefix>.<letter>-v1.dkim.mail.microsoft. The older format ends in .onmicrosoft.com. Microsoft says the old and new formats cannot coexist for the same selector, so if one does not validate, check you did not mix them.

To read the exact values in PowerShell run Get-DkimSigningConfig -Identity yourdomain.com.au | Format-List Name,Enabled,Status,Selector1CNAME,Selector2CNAME.

RecordTypeName or hostValue
SPFTXT@v=spf1 include:spf.protection.outlook.com -all
DKIM 1CNAMEselector1._domainkeythe Selector1CNAME value from Microsoft
DKIM 2CNAMEselector2._domainkeythe Selector2CNAME value from Microsoft
DMARCTXT_dmarcv=DMARC1; p=none; rua=mailto:dmarc-reports@yourbusiness.com.au

Replace yourbusiness.com.au with your own domain. The example reporting mailbox is only a placeholder.

Step 2: SPF for Microsoft 365

If Microsoft 365 is your only sender, Microsoft's documented record is v=spf1 include:spf.protection.outlook.com -all. Microsoft recommends -all (hard fail) for Microsoft 365 domains because DKIM and DMARC are also in place; its documentation notes that DMARC policy is effectively ignored for SPF soft-fail results when a message carries no DKIM signature.

If you also send from other services, add their include values inside the same record and keep below 10 DNS lookups. Each include: counts as at least one lookup, and nested includes add more. Microsoft suggests moving bulk or third-party senders to a subdomain such as marketing.yourdomain.com.au, which has its own SPF record and its own 10-lookup budget. Do not flatten the Microsoft include into IP addresses: Microsoft says its sending addresses change often.

The common typing errors Microsoft lists are a trailing full stop after the domain, an equals sign instead of a colon after include, and a space after the colon. All three break SPF.

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

Step 3: Turn on DKIM in the Defender portal

Microsoft generates two key pairs when you enable DKIM for a custom domain. One selector signs mail now; the other waits for the next key rotation. That is why there are two CNAME records and why you must publish both.

Steps from Microsoft's documentation, in the Defender portal at security.microsoft.com:

  1. Go to Email and collaboration, Policies and rules, Threat policies, Email authentication settings, then the DKIM tab.
  2. Select your custom domain. The flyout shows the status and, under Publish CNAMEs, the two records to create. If you try to turn signing on before the records exist, Microsoft shows an error that contains the required values, and the status reads CnameMissing.
  3. Create the two CNAME records at your DNS host using the host names selector1._domainkey and selector2._domainkey and the targets shown.
  4. Wait a few minutes or longer, then return to the domain and switch the toggle to Enabled. Once enabled, Rotate DKIM keys becomes available.
  5. Repeat for every custom domain and subdomain that sends mail. Do not publish DKIM CNAMEs on parked domains; Microsoft says that is not recommended.

Step 4: DMARC for Microsoft 365

Add a TXT record, host _dmarc. Microsoft's own rollout advice matches the plan on this page: start at p=none and monitor, move to p=quarantine (using pct to widen gradually through 10, 25, 50, 75, 100), then p=reject, and do the lowest-risk subdomains first and the parent domain last.

Two Microsoft facts worth knowing before you go to enforcement. First, outbound mail from a Microsoft 365 domain that fails DMARC at the receiver is routed through the high-risk delivery pool when the policy is quarantine or reject, with no override. Second, the DMARC record on a parent domain covers all subdomains, including ones that do not exist, unless they publish their own.

Inbound: Microsoft 365 sends aggregate reports to other domains only if your MX record points directly at Microsoft 365, and it does not send forensic (ruf) reports at all.

v=DMARC1; p=none; pct=100; rua=mailto:dmarc-reports@yourbusiness.com.au

A safe rollout: p=none, then quarantine, then reject

The reason for staging is simple. DMARC tells every receiving mail system what to do with mail that claims to be from your domain but fails SPF and DKIM. If one of your own systems (the invoicing tool, the booking software, the newsletter service) is not set up yet, going straight to reject throws away your own legitimate mail. Starting at p=none changes nothing for your mail and gives you the reports to find those systems first. The timeline below works the same way at Microsoft 365 as anywhere else; only where you type the record changes.

StageWhenRecordWhat to doMove on when
1. WatchDay 0 to week 4v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com.auPublish the record and change nothing else. Read the daily aggregate reports and list every system that sends as your domain: your mail platform, your invoicing tool, your newsletter service, your booking system, your website contact form.Every legitimate sender passes SPF or DKIM in the reports for two weeks in a row, and you can explain every unknown sending address.
2. Quarantine, small sliceWeek 4 to week 8v=DMARC1; p=quarantine; pct=10; rua=mailto:dmarc-reports@example.com.auAsk receivers to treat 10 percent of failing mail as suspicious. Raise it to 25, then 50 once a week, checking the reports and asking staff whether anything real went missing.Two clean weeks at pct=50 with no legitimate mail failing.
3. Quarantine, allWeek 8 to week 10v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc-reports@example.com.auAll failing mail is treated as suspicious. This is the safe place to pause if you run a lot of third-party senders.Two clean weeks at pct=100.
4. RejectWeek 10 onwardv=DMARC1; p=reject; rua=mailto:dmarc-reports@example.com.auFailing mail is refused. Keep reading the reports monthly, and add any new sending service to SPF and DKIM before it goes live.You are done. Review again whenever you add or retire a sending service.

The weeks are our recommended rhythm for a small business with a handful of senders, not a standard. Microsoft's and Google's documentation both say to start at p=none, move to quarantine, then reject, and to go slowly. Microsoft suggests widening quarantine with pct in steps of 10, 25, 50, 75 and 100. Replace dmarc-reports@example.com.au with a mailbox you will really read.

Check it worked with the free spoofing check

Run your domain through the free email spoofing check. It reads public DNS only: it does not log in to anything, send anything or touch your mail. After each step you should see the matching result change.

  1. After SPF: one SPF record is found, and it lists your mail platform.
  2. After DKIM: the selector you published is found and is a valid key.
  3. After DMARC: a record is found at _dmarc, the policy reads none, and a reporting address is present.
  4. At every later change: the policy reads quarantine or reject, and the percentage is what you set.

After enabling DKIM, send a message to an outside address and check the headers for dkim=pass and the selector name. Then run the free check for SPF and DMARC.

You can also read the records yourself. In a Windows command prompt, nslookup -type=TXT _dmarc.yourbusiness.com.aushows the DMARC record, and Microsoft's documentation uses the same command to check for syntax errors or more than one _dmarc record. If the answer is empty, the likeliest causes at Microsoft 365 are a typo in the name, a record saved in a screen your nameservers do not use, or not enough waiting time.

Microsoft 365 gotchas

  • The CNAME targets are yours aloneThey contain your domain and your initial domain prefix. Copy them from the Defender portal.
  • Both selectors, alwaysPublishing only selector1 leaves the second key unpublished and breaks rotation.
  • Old and new CNAME formats cannot be mixedA selector that validates in one format will not in the other.
  • Too many SPF lookupsMore than 10 lookups gives a permanent error. Move bulk senders to a subdomain.
  • Parked domains and onmicrosoft.comLock down unused domains, and publish a DMARC record for your onmicrosoft.com domain if you do not send from it, using Add record in the admin centre domain page.

Questions people ask

How do I set up DKIM in Microsoft 365?
In the Defender portal open Email authentication settings, the DKIM tab, select the domain, publish the two selector CNAME records Microsoft shows at your DNS host, then switch the toggle to Enabled.
Does Microsoft 365 publish SPF and DMARC for my domain?
No. Microsoft's documentation says there are no admin portals or cmdlets for those; you add them at your DNS host.
What is the SPF record for Microsoft 365?
v=spf1 include:spf.protection.outlook.com -all when Microsoft 365 is your only sender. Add other senders' includes inside the same record.
Why does my DKIM status say CnameMissing?
Microsoft cannot see the two CNAME records yet. Check the host names, the targets, and wait for DNS to catch up.

Official sources used

Want it done and checked for you?

The Email Spoofing Shield guide in the TITANOS shop covers SPF, DKIM and DMARC for Microsoft 365, Google Workspace and cPanel hosting, with record templates, a sender inventory worksheet and a staged DMARC plan, for the days you would rather follow a document than a web page. If you would rather talk it through with a person, book a free audit call with Kyle.

Book a free call