Events
Microsoft 365 Community Conference
May 6, 2 PM - May 9, 12 AM
Skill up for the era of AI at the ultimate community-led Microsoft 365 event, May 6-8 in Las Vegas.
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Check the Domains FAQ if you don't find what you're looking for.
If you host your own DNS records using Windows-based DNS, follow the steps in this article to set up your records for email, Skype for Business Online, and so on.
To get started, you need to find your DNS records in Windows-based DNS so you can update them. Also, if you're planning to synchronize your on-premises Active Directory with Microsoft, see Non-routable email address used as a UPN in your on-premises Active Directory.
Trouble with mail flow or other issues after adding DNS records, see Troubleshoot issues after changing your domain name or DNS records.
Go to the page that has the DNS records for your domain. If you're working in Windows Server 2008, go to Start > Run. If you're working in Windows Server 2012, press the Windows key and r. Type dnsmgmnt.msc, and then select OK. In DNS Manager, expand <DNS server name> > Forward Lookup Zones. Select your domain. You're now ready to create the DNS records.
Add an MX record so email for your domain will come to Microsoft.
Add the CNAME records that are required for Microsoft. If other CNAME records are listed in Microsoft, add those following the same general steps shown here.
Important
If you have Mobile Device Management (MDM) for Microsoft, then you must create two more CNAME records. Follow the procedure that you used for the other four CNAME records, but supply the values from the following table. (If you don't have MDM, you can skip this step.)
Add the SIP CNAME record.
Add the Skype for Business Online Autodiscover CNAME record.
Important
If you have Mobile Device Management (MDM) for Microsoft, then you must create two more CNAME records. Follow the procedure that you used for the other four CNAME records, but supply the values from the following table. >(If you don't have MDM, you can skip this step.)
Add the MDM Enterpriseregistration CNAME record.
Add the MDM Enterpriseenrollment CNAME record.
Important
You can't have more than one TXT record for SPF for a domain. If your domain has more than one SPF record, you'll get email errors, as well as delivery and spam classification issues. If you already have an SPF record for your domain, don't create a new one for Microsoft. Instead, add the required Microsoft values to the current record so that you have a single SPF record that includes both sets of values.
Add the SPF TXT record for your domain to help prevent email spam.
Important
In some versions of Windows DNS Manager, the domain may have been set up so that when you create a txt record, the home name defaults to the parent domain. In this situation, when adding a TXT record, set the host name to blank (no value) instead of setting it to @ or the domain name.
Host type: @
Record Type: TXT
Address: v=spf1 include:spf.protection.outlook.com -all
Select OK.
Add the two SRV records that are required for Microsoft.
Add the SIP SRV record for Skype for Business Online web conferencing.
Add the SIP SRV record for Skype for Business Online federation.
Before you add the DNS records to set up your Microsoft services, Microsoft has to confirm that you own the domain you're adding. To do this, you add a record, following the steps after this.
Note
This record is used only to verify that you own your domain; it doesn't affect anything else.
Add a TXT record.
Important
In some versions of Windows DNS Manager, the domain may have been set up so that when you create a txt record, the home name defaults to the parent domain. In this situation, when adding a TXT record, set the host name to blank (no value) instead of setting it to @ or the domain name.
Verify your domain in Microsoft.
Important
Wait about 15 minutes before you do this, so the record you just created can update across the Internet.
Note
Typically it takes about 15 minutes for DNS changes to take effect. However, it can occasionally take longer for a change you've made to update across the Internet's DNS system. If you're having trouble with mail flow or other issues after adding DNS records, see Troubleshoot issues after changing your domain name or DNS records.
If you're planning to synchronize your on-premises Active Directory with Microsoft, you'll want to make sure that the Active Directory user principal name (UPN) suffix is a valid domain suffix, and not an unsupported domain suffix such as @contoso.local. If you need to change your UPN suffix, see How to prepare a non-routable domain for directory synchronization.
Note
Typically it takes about 15 minutes for DNS changes to take effect. However, it can occasionally take longer for a change you've made to update across the Internet's DNS system. If you're having trouble with mail flow or other issues after adding DNS records, see Troubleshoot issues after changing your domain name or DNS records.
Transfer a domain from Microsoft 365 to another host (article)
Pilot Microsoft 365 from my custom domain (article)
Domains FAQ (article)
Events
Microsoft 365 Community Conference
May 6, 2 PM - May 9, 12 AM
Skill up for the era of AI at the ultimate community-led Microsoft 365 event, May 6-8 in Las Vegas.
Learn more