Here we cover the steps to add the DNS records needed for Microsoft 365 core services in your cPanel.
Email is a critical component of many businesses, and as such, having reliable mail service is often a must. While you can utilize the email services included with cPanel to run your own mail server, this has become increasingly more difficult in recent years and often requires an experienced system administrator to maintain it.
With this in mind, the use of an established email service provider, such as Microsoft 365 or Google Workspace, is highly recommended in cases where email service is vital. Microsoft 365 (formerly known as Office 365) is a line of subscription services offered by Microsoft including Outlook, Microsoft Office, and much more.
Before you start using these services with your domain, you'll need to make some DNS changes. While you can opt to use Microsoft's nameservers to simplify the process, you may wish to continue managing your domain's DNS from your Web Hosting Hub account instead.
Related Articles
Getting Started with cPanel
Change DNS Records Using cPanel Zone Editor
Update Domain Nameservers
Verify Domain with TXT record
- In the Microsoft 365 admin center, go to the Settings>Domains page
- On the Domains page, select your domain, then select Start setup; you'll go back to the domains setup wizard to see the specific value you need to add
- On the Domain Verification page, select Add a TXT record to the domain's DNS records, then select Continue
- Copy the TXT value shown
TIP: It looks like this: MS=msXXXXXXXX. - Log into cPanel
- Navigate to Zone Editor, located under the Domains section
- Click the Manage button next to the applicable domain
- Click the down arrow next to the +Add Record button, then click Add "TXT" Record
- Add the following values:
- Name: Enter your domain
- TTL: Leave this set to 900
- Record: Paste the record you copied from your Microsoft admin center
- Click the Save Record button
- Return to your Microsoft admin center to complete the domain verification
NOTE: DNS modifications may take up to 4-24 hours to fully propagate.
Add an MX record for Email (Outlook, Exchange Online)
IMPORTANT: Be sure to set up your email accounts in the Microsoft admin center before updating your MX records to avoid disruption in email service.
- In the Microsoft 365 admin center, go to the Settings>Domains page
- On the Domains page, select your domain
- Choose Manage DNS, select More Options>Add your own DNS and select Continue to see the DNS records to add
- Log into cPanel
- Navigate to Zone Editor, located under the Domains section
- Click the Manage button next to the applicable domain
- Click MX under Filter
- Click the Delete button beside the existing MX record
- Click the Continue button to confirm deletion
- Click the down arrow next to the +Add Record button then click Add "MX" Record
- Add the following values:
- Name: Enter your domain
- TTL: Leave this set to 900
- Priority: 0
- Destination: Copy the MX value from your Microsoft admin center and paste it here
TIP: This will look like<MX token>.mail.protection.outlook.com
.
- Click the Save Record button
NOTE: DNS modifications may take up to 4-24 hours to fully propagate.
Add SPF record (Outlook, Exchange Online)
- Log into cPanel
- Navigate to Zone Editor, located under the Domains section
- Click the Manage button next to the applicable domain
- Click the down arrow next to the +Add Record button, then click Add "TXT" Record
- Add the following values:
- Name: Enter your domain
- TTL: Leave this set to 900
- Record: v=spf1 include:spf.protection.outlook.com -all
NOTE: If you already have an SPF record for your domain, don't create a new one for Microsoft 365. Instead, add the required Microsoft 365 values to the current record so that you have a single SPF record that includes both sets of values. For example, this might look like the following:v=spf1 +ip4:199.250.218.13 +include:smtp.servconfig.com +include:spf.protection.outlook.com -all
- Click the Save Record button
NOTE: DNS modifications may take up to 4-24 hours to fully propagate.
Add CNAME records to connect other services (Teams, Exchange Online, AAD, MDM)
- Log into cPanel
- Navigate to Zone Editor, located under the Domains section
- Click the Manage button next to the applicable domain
- Click the down arrow next to the +Add Record button, then click Add "CNAME" Record
- Add the following values:
- Name: Copy the value from the admin center and paste it here
- TTL: Leave this set to 900
- Record: Copy the value from the admin center and paste it here
NOTE: You'll get these details from the Microsoft admin center domain setup wizard.
- Click the Save Record button
NOTE: DNS modifications may take up to 4-24 hours to fully propagate.
Add SRV Records for Communications services (Teams, Skype for Business)
- Log into cPanel
- Navigate to Zone Editor, located under the Domains section
- Click the Manage button next to the applicable domain
- Click the down arrow next to the +Add Record button, then click Add "SRV" Record
- Add the following values:
- Name: Enter your domain, preceded by the Service and Protocol, which you'll copy from the admin center
NOTE: You must specify the Service and Protocol values in the record's Name field. To add these values, you create a single string, separating the values with a dot. For example, this might look like the following:
_sip._tls.domain.com
- TTL: Leave this set to 900
- Target: Copy the value from the admin center and paste it here
- Priority: 100
- Weight: 1
- Port: Copy the value from the admin center and paste it here
- Name: Enter your domain, preceded by the Service and Protocol, which you'll copy from the admin center
- Click the Save Record button
NOTE: DNS modifications may take up to 4-24 hours to fully propagate.