Required DNS Records for Microsoft 365 (Office 365) Custom Domain Setup (MX, SPF, DKIM, DMARC & Autodiscover)

✨ Quick Checklist — Microsoft 365 Custom Domain DNS Records (2026)
  • Mail Routing & Discovery: MX (<domain-key>.mail.protection.outlook.com) + autodiscover CNAME (autodiscover.outlook.com).
  • Mandatory Email Authentication: SPF TXT (v=spf1 include:spf.protection.outlook.com -all), DKIM (selector1._domainkey & selector2._domainkey CNAMEs), and DMARC (_dmarc TXT).
  • Device Management (Intune): enterpriseregistration & enterpriseenrollment CNAMEs.

When you add a custom domain in the Microsoft 365 Admin Center (Settings -> Domains), Microsoft verifies domain ownership with a TXT record (MS=msXXXXXXXX) and then expects the following public DNS records for Exchange Online, Microsoft Teams, and Microsoft Intune.


1. Exchange Online Mail Flow & Autodiscover Records

TypeHost NamePoints to / ValuePriority / TTL
MX@<domain-key>.mail.protection.outlook.comPriority 0 / TTL 3600
CNAMEautodiscoverautodiscover.outlook.comTTL 3600

2. Email Security Records (SPF, DKIM & DMARC)

In 2026, bulk senders and major providers enforce strict SPF, DKIM, and DMARC alignment:

TypeHost NameValue
TXT (SPF)@v=spf1 include:spf.protection.outlook.com -all
CNAME (DKIM 1)selector1._domainkeyselector1-<domain-guid>._domainkey.<initial-domain>.onmicrosoft.com
CNAME (DKIM 2)selector2._domainkeyselector2-<domain-guid>._domainkey.<initial-domain>.onmicrosoft.com
TXT (DMARC)_dmarcv=DMARC1; p=quarantine; rua=mailto:[email protected]; pct=100
Audit All Domains Automatically: Use our Audit SPF, DKIM & DMARC Across All M365 Tenant Domains PowerShell Script.

3. Microsoft Intune (MDM) & Legacy Teams/Skype CNAME & SRV Records

TypeHost NamePoints to / Target
CNAMEenterpriseregistrationenterpriseregistration.windows.net
CNAMEenterpriseenrollmententerpriseenrollment.manage.microsoft.com
CNAMElyncdiscover (if used)webdir.online.lync.com
CNAMEsip (if used)sipdir.online.lync.com
CNAMEmsoid (legacy)clientconfig.microsoftonline-p.net
TypeService / ProtocolPort / Weight / PriorityTarget
SRV_sip._tlsPort 443, Weight 1, Priority 100sipdir.online.lync.com
SRV_sipfederationtls._tcpPort 5061, Weight 1, Priority 100sipfed.online.lync.com

Verify Public DNS Records via PowerShell

POWERSHELL
$Domain = "lab365.in"

Resolve-DnsName -Name $Domain -Type MX | Select-Object Name, NameExchange, Preference
Resolve-DnsName -Name $Domain -Type TXT | Select-Object Name, Strings
Resolve-DnsName -Name "autodiscover.$Domain" -Type CNAME | Select-Object Name, NameHost
Resolve-DnsName -Name "_dmarc.$Domain" -Type TXT | Select-Object Name, Strings

References & Official Microsoft Documentation

💬 Reader Comments & Feedback

Did this runbook help, or did Microsoft change a cmdlet or UI menu? Share your feedback below.