1. Home
  2. E-mail
  3. How do I connect my email with Office 365?

How do I connect my email with Office 365?

Den här artikeln finns även på svSvenska

If you want to use Office 365 to handle email for you domain name there are a couple of things you have to do before it will work. First you have to log in to cPanel, we have a guide here that shows you how to do that. When you have logged in you can follow the instructions below.

To be able to follow the instructions in this guide your domain name have to use our name servers (dns1.oderland.com, dns2.oderland.com, dns3.oderland.com). If it doesn’t use our name servers you need to instead make the changes with the provider responsible for the name servers that your domain name uses. You can see which name servers your domain name uses by doing a whois.


Before you can redirect your emails towards Office 3Microsofts documentation65, Microsoft needs you to verify that you are the owner of the domain name. To do this verification you have to add a TXT record that holds a unique value that you got from Microsoft.

  1. To add a TXT record you have to click on Zone Editor.
  2. Click on Manage to the right of the domain name you want to create the record for. You should have been given information from Microsoft regarding what your TXT record should contain. The content will be unique for each user and therefore it is impossible for us to give you the value.
  3. When you know what your TXT record should contain you can create a new record by clicking on the button Add Record.
  4. Choose TXT in the column Type, in the column called Name you need to type in your domain name (for instance example.se) and set the TTL to 3600. In the last column, Record, you need to enter the value you got from Microsoft, it should use the format MS=msXXXXXXXX.

    You are not supposed to type MS=msXXXXXXXX here. What exactly you need to type has been sent to you by Microsoft.


  1. When you have verified that you own the domain name by following the instructions above you have to create the MX records that are required for Office 365. To do this you need to click on Zone Editor in cPanel, if you haven’t done that already. If you are unsure how to do this you can follow the steps 1-2 in the chapter about TXT records.
  2. Now you have to find and delete all existing MX records, you will create new MX records in the next step. Click on Delete on the right for all DNS records that are of the type MX.
  3. To create a new MX record you have to click on the button Add Record.
  4. Then choose MX as the type, priority should be set to 0 and what you should use as destination you have to get from Microsoft. Save the new DNS record when you are finished.
  5. Now you have to go back to cPanels main page so you can click on Email Routing.
  6. If you get a question regarding which domain you want to redirect you have to choose the domain name you want to use with Office 365.
  7. You should now see a page with four options, you need to choose the option called Remote Mail Exchanger. When you have done that, click on Change to save.


  1. To add the four CNAME:s that Office 365 require you have to open the Zone Editor in cPanel, if you haven’t done that already. If you don’t know how to do it you can follow steps 1-2 in the chapter about TXT records.
  2. To add a new CNAME record you have to click on the Add Record button.
  3. Create four CNAME:s with the following values:
    Name: TTL: Type: Record:
    autodiscover.exempel.se. 3600 CNAME autodiscover.outlook.com
    lyncdiscover.exempel.se. 3600 CNAME webdir.online.lync.com
    msoid.exempel.se. 3600 CNAME clientconfig.microsoftonline-p.net
    sip.exempel.se. 3600 CNAME sipdir.online.lync.com
  4. If you are going to use MDM (Mobile Device Management) you have to add two more CNAME:s according to the Microsoft documentation.


  1. You have to add two SRV records as well, you add these records in the Zone Editor in cPanel. If you don’t know how to find the Zone editor you can follow steps 1-2 in the chapter about TXT records.
  2. To create a new DNS record you have to click on the Add Record button.
  3. Create two DNS records and type in the following information in each field.
    Name: TTL: Type: Priority:
    _sip._tls.exempel.se 3600 SRV 100
    _sipfederationtls._tcp.exempel.se 3600 SRV 100
    Name: Weight: Port: Target:
    _sip._tls.exempel.se 1 443 sipdir.online.lync.com
    _sipfederationtls._tcp.exempel.se 1 5061 sipfed.online.lync.com


    Due to the number of values we couldn’t fit everything on one row. Therefore the column called “Name” is shown twice for the purpose of clarifying which values belong to which DNS record.

  4. This is what it should look like when it is finished. You can read more about SRV records in Microsofts documentation.


You also need to include Microsofts mail server in your SPF record. If you do not already have a SPF record you can start by creating one.

When you have activated SPF you need to do the following:

  1. In cPanel click on the icon Authentication. [IMAGE]
  2. Then click on the blue button called Add to the right of where it says Include List.
  3. In the window that opens up you need to enter spf.protection.outlook.com, click Ok when you have done that.
  4. Click on Update to save your settings.

Was this article helpful?

Related Articles

Behöver du mer hjälp?
Kan du inte hitta lösningen på ditt problem? Då kan du kontakta oss via e-post, chatt och telefon!