How to Setup Office 365 DNS Records

Learn How to Setup Office 365 DNS Records

In this article, we will outline how you can obtain and configure the Office 365 DNS records used for connecting your cPanel account to your Office 365 service. As the DNS records used for this are account-specific they will need to be obtained from your Office 365 account.

Integrate Office 365 with your Shared Hosting account to take your business to the next level!

Locating your Office 365 DNS Records

To locate your Office 365 DNS records, you need to first verify your domain in Office 365. This can be done via the following instructions:

  1. Log into your Office 365 account.
  2. Navigate to the Setup > Domains page.
  3. From there, select the domain you want to use, then select Start Setup, which will then display the value needed in the next step. 
  4. Go to the Verify Domain page.
  5. Select Add a TXT record instead and press Next
  6. Copy the TXT value that is displayed, which should look something like the following:
  7. Create the TXT Record using this value via the Zone Editor in cPanel.
  8. Go back to your Office 365 account and verify your domain. 
  9. Remove the TXT record in the cPanel Zone Editor once verified. 

Now that the domain is verified, you can locate the MX records in your Office 365 account via the following instructions:

  1. Log in to your Office 365 account and navigate to Setup > Domains.
  2. From the domains tab, select the domain you verified in the previous section.
  3. In the Required DNS Settings area, you will see the DNS records to add. These are the settings you will need to configure within your cPanel account. 

Adding Office 365 DNS Records in cPanel

Once you have the DNS settings required for your Office 365 account, you can then use the cPanel Zone Editor to add the necessary DNS entries: 

  1. Log into cPanel.
  2. Go to Zone Editor.
  3. Add an MX record using the settings found in the previous section. 
  4. Add 3 CNAME records:

    CNAME Record 1 (select CNAME from the drop-down menu)

    • Valid Zone Name: autodiscover
    • Fully Qualified Domain Name:
    • TTL: 1 hour or 3600 seconds (this value is entered in the blank space next to the Valid Zone Name)

    CNAME Record 2
    • Valid Zone Name: lyncdiscover
    • Fully Qualified Domain Name:
    • TTL: 1 hour or 3600 seconds

    CNAME Record 3
    • Valid Zone Name: sip
    • Fully Qualified Domain Name:
    • TTL: 1 hour or 3600 seconds
  5. Add TXT record for SPF for spam protection:

    • Host: @
    • TXT Value: v=spf1 -all
    • TTL: 1 hour or 3600 seconds
  6. Add two SRV records with the following values:

    SRV Record 1
    • Name: _sip._tls
    • TTL: 3600
    • Type: SRV
    • Priority: 100
    • Weight: 1
    • Port: 443
    • Target:

    SRV Record 2
    • Name: _tcp._sipfederationtls
    • TTL: 3600
    • Type: SRV
    • Priority: 100
    • Weight: 1
    • Port: 5061
    • Target:

Once you have added all of the necessary records it may take 4-24 hours for the changes to propagate through the rest of the global internet. After this time you should begin to receive email via your Office 365 account.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

6 thoughts on “How to Setup Office 365 DNS Records

  1. Hello. Just wanted to mention that there are some problems with implementing the instructions on this article. One problem is adding an @ sign at step 5 from Adding Office 365 DNS Records in cPanel. I needed the assistance of one your your agents to do that.
    Just wanted to mention it here too as I mentioned it to the agent to bring it up to the attention of someone that can fix the problem.

    1. Hello Petry – thanks for the feedback about the issues with the steps in the article. We’ll review them and make changes as necessary. We appreciate you bringing it to our attention.

  2. Hello – just got off Microsoft support because they could not detect the SRV for TCP as written above. What works is the following _sipfederationtls._tcp. The protocol needs to go after the service. Hopefully my email works now 🙂

  3. Does not mention the required Office 365 Business plan to access domain verification. Unable to find an alternative to getting InMotion Hosting Email through Outlook without an expensive subscription to Office 365 Business plan.

    1. Hi Joseph, if you just want to add an InMotion Hosting email account to the Outlook client, we have a list of walkthroughs and a guide to the basic settings required in our Email Getting Started Guide. Is that what you mean? If not, please let me know what step of the process you’re encountering trouble on, as you should be able to set this up on an existing plans, and we’ll try to figure out what the issue is.

Was this article helpful? Let us know!