How to Connect Your Custom Domain to Microsoft 365: A Step-by-Step Guide
Benjamin Gbolaru
Microsoft 365
November 19th, 2024
Setting up a custom domain in Microsoft 365 will go a long way in adding to the professional look and feel of an organization. If you have bought a domain from a third-party hosting service, you can set it up with Microsoft 365 by changing your DNS records. This tutorial will take you through each step so that the connection is smooth and seamless.
Why Connect Your Custom Domain to Microsoft 365?
By setting up your domain, you will be able to use professional email addresses-most commonly user@yourdomain.com-and also access other Microsoft 365 services under the branding of your domain name. By default, until you set up a custom domain, your users will be using an onmicrosoft.com domain.
Key Benefits:
Increased Professionalism: Branded emails lend greater credence to your organization.
Simplified User Management: You can add the domain before creating user accounts to avoid reconfigurations.
If you have already created users in the default domain, then you can change users’ email addresses in the Microsoft 365 Admin Center.
Step 1: Verifying Your Domain Ownership with a TXT or MX Record
The first step to linking your domain is verifying that you own it.
Option 1: Verify with a TXT Record (Recommended)
Sign in to the Microsoft 365 admin center and navigate to Settings > Domains.
Type the name of the domain you want to add to the M365 tenant and click the ‘Use this domain’ button.
Open a new tab, log into your DNS hosting provider’s site, and locate the DNS settings (like Zone File Settings or DNS Manager).
Add the TXT record shown in the Microsoft 365 admin center to your domain. For example:
TXT Name: @
TXT Value: MS=ms######## (unique ID from the admin center)
TTL: 3600 (or default setting)
Save the record, go back to the Microsoft 365 admin center, and click Verify. Verification may take up to 15 minutes, so be patient if it doesn’t work right away.
Option 2: Verify with an MX Record (If TXT Not Supported)
In the Microsoft 365 admin center, go to Settings > Domains.
On your DNS hosting site, locate the DNS settings.
Add an MX record with the following details:
Record Type: MX
Priority: High value
Host Name: @
Points to Address: Copy from the admin center
TTL: 3600
Make sure this MX record has the highest priority, then click Verify. You can delete this record once verification is complete.
Step 2: Adding DNS Records for Microsoft 365 Services
After verification, it’s time to add DNS records to enable Microsoft 365 services such as email, Teams, and Skype for Business.
Adding an MX Record for Email
Before setting up the MX record, ensure users have accounts in the admin center to prevent any email disruption.
In your DNS manager, add an MX record with:
Record Type: MX
Priority: Highest available, typically 0
Host Name: @
Points to Address: Copied from the admin center
TTL: 3600
Save this MX record and delete any existing MX records to avoid conflicts.
Adding CNAME Records for Additional Services (Teams, Exchange Online, MDM)
In your DNS manager, add CNAME records based on the admin center’s setup wizard.
Ensure each CNAME record has:
Record Type: CNAME (Alias)
Host: Copy from the admin center
Points to Address: Paste the value provided
TTL: 3600
Adding or Editing SPF TXT Record for Email Authentication
Locate the SPF record in your DNS manager. If one exists, update it with Microsoft 365’s values.
Validate the SPF record with an SPF validation tool to prevent email spoofing. Consider also setting up DKIM and DMARC to bolster email security.
Adding SRV Records for Communications Services (Teams, Skype for Business)
To support Teams and Skype, add SRV records in your DNS manager.
Set fields like so:
Record Type: SRV
Name: @
Target: Value from admin center
Protocol, Service, Priority, Weight, and Port: Follow values provided in the admin center.
TTL: 3600
If your provider restricts certain fields, see below for workarounds.
SRV Record Field Restrictions and Workarounds
Some DNS providers may impose restrictions on certain fields within an SRV record. If you encounter these limitations, here’s how to proceed:
Name Field: If @ is not allowed, leave the field blank.
Service and Protocol: If separate fields for Service and Protocol are not available, combine them into a single string (e.g., _sip._tls).
Priority, Weight, and Port: If these fields are limited, include them in the Target field, separated by spaces (e.g., 100 1 443 sipdir.online.lync.com).
Conclusion
By following this guide, you’ll successfully connect your custom domain to Microsoft 365. The screenshot below shows the domain name used in the example connected successfully.
This integration not only enhances your brand’s professionalism but also unlocks a wide range of Microsoft services. For expert assistance with domain integration or any Microsoft 365 configurations, reach out to the Medha Cloud Technical Support Team. Our certified professionals are ready to guide you every step of the way and ensure your setup is seamless and efficient. We’ll be glad to help you unlock the full potential of Microsoft 365 for your organization.