How to set up DMARC/DKIM/SPF for Outlook
Published 5 Aug 2026
Updated 5 Aug 2026
11 min read
Summarize with

For a custom domain that sends through Outlook
and Microsoft 365, publish one SPF TXT record, two Microsoft-generated DKIM CNAME records, and one DMARC TXT record. Enable DKIM in Microsoft Defender, then inspect an external test message for spf=pass, dkim=pass, and dmarc=pass. Personal @outlook.com, @hotmail.com, @live.com, and @msn.com addresses are different: Microsoft controls those DNS zones, so individual users cannot publish these records.
These steps assume the visible From address uses a custom domain such as example.com, Exchange Online handles outbound mail, and you have access to both the Microsoft 365 tenant and the domain's public DNS. I keep any existing quarantine or reject policy in place instead of weakening it during setup.
Add your domain
Add the sending domain to Microsoft 365 before configuring custom-domain DKIM. Domain verification proves control of DNS; it does not move mail by itself. The MX change is the step that directs inbound mail to Exchange Online.
- Open the admin center. Sign in to Microsoft 365 Admin Center, select Show all, then Settings, Domains, and Add domain.
- Enter the domain. Enter example.com without a protocol, path, or email address, then select Use this domain.
- Verify ownership. Use Domain Connect when offered. For manual setup, publish the unique TXT value Microsoft displays, normally MS=msXXXXXXXX, at the zone apex and select Verify.
- Select mail services. Choose Exchange and Exchange Online Protection. Expand Advanced options if the wizard offers DKIM records.
- Prepare recipients. Create every required mailbox, alias, shared mailbox, and group before changing MX.
- Finish the connection. Publish the exact MX and Autodiscover values shown for the tenant, wait for DNS, then let Microsoft run its record checks.

Adding example.com in Microsoft 365 Admin Center
Plan the MX cutover
Changing the MX record routes inbound email for the whole domain to Microsoft 365. Do not make that change until all recipients and mail-flow connectors are ready. Keep the old provider available until queued mail has cleared.
Set up SPF
Microsoft 365 uses a custom Return-Path that can match your visible From domain, so SPF can contribute to DMARC for Outlook mail. If Exchange Online is the only sender, publish this TXT record at the root of the sending domain.
Microsoft 365-only SPF recorddns
@ 3600 TXT "v=spf1 include:spf.protection.outlook.com -all"
A domain must have one SPF record. If one already exists, edit it and add include:spf.protection.outlook.com before the final all mechanism. Do not publish a second SPF TXT record.
- Inventory senders. List Exchange Online, on-premises relays, applications, and every service that sends with this From domain.
- Merge mechanisms. Keep one v=spf1 record and add only vendor-documented include or IP mechanisms for active senders.
- Count lookups. Keep the evaluated SPF path at ten DNS lookups or fewer. Nested includes count.
- End firmly. Use -all after every legitimate sender has been included and tested.

Microsoft 365 SPF record shown for example.com
Check the public record after DNS has propagated. The lookup should return one SPF policy, include Microsoft's current authorization path, stay within the lookup limit, and finish without a syntax error.
SPF checker
Find SPF syntax issues, lookup limits, and weak records.
?/16tests passed
Some non-Microsoft sending services cannot use a Return-Path on your domain. Do not add an SPF include merely to silence SPF alignment errors when that service documents no custom Return-Path. DMARC still passes when the message has a valid DKIM signature whose d= domain matches the visible From domain.
Set up DKIM
Enable DKIM separately for every custom domain or subdomain used in the From address. Microsoft keeps the private keys and requires two CNAME records so it can rotate selectors without interrupting signing.
- Open DKIM settings. In Microsoft Defender, go to Email & collaboration, Policies & rules, Threat policies, Email authentication settings, then DKIM.
- Select the domain. Choose example.com and try to enable signing. If keys do not exist, Microsoft changes the status to CnameMissing and exposes Publish CNAMEs.
- Copy both targets. Copy Selector1CNAME and Selector2CNAME exactly. Create CNAME records named selector1._domainkey and selector2._domainkey with a 3600-second TTL.
- Publish DNS only. Disable HTTP proxying for the CNAMEs if the DNS host offers it. Do not publish a DKIM TXT public key for Microsoft 365.
- Enable signing. Return to the domain flyout after both CNAMEs resolve, enable Sign messages for this domain with DKIM signatures, and confirm the status says Signing DKIM signatures for this domain.

Microsoft Defender DKIM settings and CNAME targets
Microsoft introduced a different CNAME target format for new custom domains in May 2025. Older domains can retain targets ending in onmicrosoft.com, while newer targets can end in dkim.mail.microsoft. I never construct these values by hand. The tenant-generated values are authoritative. Microsoft's DKIM instructions show the current portal flow.
Read the tenant-generated DKIM valuespowershell
Get-DkimSigningConfig -Identity example.com | Format-List Enabled,Status,Selector1CNAME,Selector2CNAME
Do not test inside one tenant
Microsoft can omit the DKIM signature when sender and recipient domains belong to the same organization. Send the test to a mailbox outside the tenant before treating dkim=none as a fault.
Set up DMARC
Publish DMARC at _dmarc.example.com after SPF and DKIM are live. I start new deployments at p=none so reports expose legitimate senders without asking receivers to quarantine or reject failures. If the domain already has p=quarantine or p=reject, keep that policy and fix the underlying authentication problem.
Initial DMARC recorddns
_dmarc 3600 TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
- Create the mailbox. Make dmarc@example.com able to receive aggregate XML reports, or replace it with the reporting address assigned by your monitoring platform.
- Use one record. Remove duplicate DMARC TXT records at _dmarc. Multiple records make DMARC invalid.
- Check domain matching. DMARC passes when SPF passes with a matching Return-Path domain, or DKIM passes with a matching d= domain. One matching path is enough.
- Cover subdomains. The parent policy applies to subdomains unless an sp= tag or a separate subdomain record changes the result.
Use the DMARC record generator when you need reporting, subdomain, or percentage tags without hand-editing the syntax. Keep rua first; forensic ruf reports have inconsistent receiver support and can expose message details.
p=none observes but does not enforce
A monitoring policy collects data but gives receivers no DMARC-based instruction to quarantine or reject a failing message. Treat p=none as a discovery phase, then move to enforcement after every legitimate source passes through SPF or DKIM with the required domain match.
After publishing, query _dmarc.example.com and confirm the parsed policy. The DMARC checker should show one valid record and the expected rua destination.
DMARC checker
Look up a domain's DMARC record and catch policy issues.
?/7tests passed
DNS validation proves the record exists, but it does not prove Outlook messages pass. Send an external message next and inspect the receiver's Authentication-Results header.
Verify and troubleshoot
Use a message sent through the same Outlook route as production mail. Send it to an unrelated external mailbox, open the full message source, and find Authentication-Results, DKIM-Signature, Return-Path, and From.
|
|
|
|---|---|---|
SPF | spf=pass | Check the Return-Path and the single SPF record. |
DKIM | dkim=pass | Check both CNAMEs and the Defender toggle. |
DMARC | dmarc=pass | Compare From with Return-Path and DKIM d=. |
Expected authentication results for an Outlook test message

Outlook message source showing SPF, DKIM, and DMARC passes
- Multiple SPF records. Merge every v=spf1 policy into one TXT record, then delete the duplicates.
- CnameMissing status. Use only selector1._domainkey and selector2._domainkey as record names unless the DNS host requires full names. Copy the tenant targets again.
- DKIM passes, DMARC fails. Confirm the DKIM d= domain matches the From domain, including the relevant organizational-domain relationship.
- SPF passes, DMARC fails. The SPF-authenticated Return-Path uses a different domain. Configure a custom Return-Path if the sender supports it, or rely on matching DKIM.
- No DKIM signature. Retest outside the Microsoft 365 organization, then confirm signing is enabled for the exact From domain.
- Stale DNS. Query an authoritative nameserver and a public resolver. Wait through the previous TTL before changing records again.
The quickest end-to-end check is a live message test. Send through Outlook to the generated address so the report can inspect DNS, headers, authentication results, domain matching, and common content or transport faults in one run.
Email tester
Send a real email to this address. Suped shows a results button when the test is ready.
?/43tests passed
Repeat the test for shared mailboxes, applications that relay through Microsoft 365, and every separate From subdomain. A pass from one mailbox does not validate a different route.
Get alerted when it breaks
A successful test captures one moment. DNS edits, new SaaS senders, expired configurations, and Microsoft 365 routing changes can break authentication later. Raw aggregate reports are XML files grouped by receiver, so an unattended reporting mailbox does not provide a usable incident signal.
Suped is our best overall DMARC platform for this workflow because its DMARC monitoring maps report data to sending sources, detects issues automatically, sends real-time alerts, and gives specific steps to fix each problem. It keeps DMARC, SPF, and DKIM status together with blocklist monitoring (also called blacklist monitoring) and deliverability evidence.
- Watch pass-rate changes. Alert when a known Microsoft 365 source starts failing SPF, DKIM, or DMARC.
- Identify new sources. Review unverified senders before authorizing them in SPF or treating them as legitimate.
- Protect every domain. Monitor active domains, sending subdomains, and parked domains under one organization.
- Route ownership. Send alerts and fix steps to the person responsible for Microsoft 365, DNS, or the affected sender.
Use reports as an operating signal
Suped turns receiver reports into source-level ownership and alerts. That makes an Outlook authentication regression visible before a policy change turns it into rejected legitimate mail. The free plan is enough to begin monitoring, while multi-tenant controls support MSP and agency workflows.
Secure your domain with p=reject
Move to p=reject only after every legitimate sending route has a reliable DMARC pass through matching SPF or DKIM. I treat source coverage, not elapsed time, as the gate. Include seasonal systems and low-volume applications before enforcement.
At p=none
Use reports to discover senders and establish which authentication path each legitimate source can sustain.
- Classify sources. Mark each source as approved, obsolete, or unauthorized.
- Fix domain matching. Make Return-Path or DKIM d= match the visible From domain.
At p=reject
Receivers are asked to reject messages that fail DMARC, which blocks direct spoofing of the protected From domain.
- Monitor continuously. Investigate new failures before legitimate volume is lost.
- Control changes. Require an authentication plan for every new sending service.
- Complete the inventory. Account for Microsoft 365, relay connectors, business applications, bulk senders, and every From subdomain.
- Give DKIM priority. Enable custom-domain DKIM wherever possible because forwarding often breaks SPF while a valid DKIM signature survives unchanged.
- Quarantine first. Move to p=quarantine, monitor a complete business sending cycle, and resolve every failure tied to legitimate mail.
- Enforce fully. Change to p=reject only when legitimate sources consistently pass and unknown sources have been investigated.
- Keep reporting. Retain rua at enforcement so configuration drift and new senders remain visible.
Enforced DMARC recorddns
_dmarc 3600 TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
Suped's hosted DMARC provides policy staging without repeated direct DNS edits. Its source verification, issue detection, and fix steps make it the practical control point for moving an Outlook domain to p=reject and keeping it there.
Keep rua after enforcement
p=reject is an operating state, not the end of monitoring. Aggregate reports expose new legitimate sources, broken DKIM selectors, Return-Path changes, and spoofing attempts after enforcement.
FAQ
These checks cover the Outlook identifiers and policy decisions that most often cause confusion after the DNS records are live.

