Due to the multi-tenant nature of office 365, all the tenants in Office 365 by default have a domain name like <Company Name>.onmicrosoft.com.
- The customers would like to retain their email address domain name even after migration to Office 365
- When we migrate mailboxes from On-Premises to Office 365, one of the first steps involved is to add the domain name (SMTP domain) of the customer in Office 365.
This article describes the step by step approach to add a custom domain name to Office 365 tenant.
First navigate to Office 365 admin center with the URL http://portal.office.com.
The interface of Office 365 has been recently upgraded and I am have followed the latest UI in this article.
We need to select “Add Domain” option either from “Home Screen” of “Office 365 Admin Center” or from the “Settings” option in the left pane of “Office 365 Admin Center”
After we click on “Add domain”, we get the below console where the default Office 365 domain name is present. In this case, it is dconsultant.onmicrosoft.com. Click on “Add domain” button in the below console.
Now the “New domain” wizard appears. It is a fairly simple process in which the below steps are carried out.
- Add our custom domain name
- Verify that the domain name is owned by the tenant
- Setup online services like Skype, Sharepoint, Exchange etc
- Update relevant DNS records
In this case, I am entering the domain name as “msmessagingpro.com” which is a domain I own.
Now the critical part of verifying the domain name comes to picture. We cannot add a domain name to our tenant unless until we own that particular domain.
Hence we need to verify/prove that we own the domain name via below methods.
- TXT record
- By adding a custom TXT value presented in “New Domain” addition wizard on the DNS server of the domain we own. In most cases, we can update the TXT record via browser. In our demo, we will be adding msmessagingpro.com which is a domain name provided by WordPress.com and I own that particular domain.
- MX record
- This option can be used if we have currently published an MX record under the domain name. This is mostly used if an existing On-Premise Exchange server uses the domain name we are trying to add to the Office 365 domain.
We are going with the first option of verifying the domain name using TXT record.
We need to add the below TXT record (MS=ms31321414) to the DNS server where msmessagingpro.com is hosted. Also the TXT record would vary for requests from individual tenants and hence it is unique to your domain.
Before we click on the “Verify” button, we need to add the TXT record in the Internet DNS server. I am going to add the value as given in below snaps which are taken from WordPress.com since msmessagingpro.com is provided to me by WordPress.
Note: You can always click on “Your DNS host” (highlighted in blue in above snap) to check for the various DNS hosts directly supported by Office 365 which will make your domain verification much easier. Unfortunately, WordPress provider is not one among them and hence we do all the steps in this demo manually.
Adding TXT records in WordPress.com’s DNS server for msmessagingpro.com.
Once the TXT record is added, click on the “Verify” button under “Verify domain” window mentioned in Step 4.
Once the domain name is verified, we need to setup the various DNS records for all the services/offerings provided by Office 365. If we don’t register the below records, the internet mail delivery to the custom domains would be affected.
Since I have a website with WordPress.com, I am going to update the DNS records manually. In most cases if you have purchased the domain from GoDaddy, MyHosting etc, you can go with first option and authorize Office 365 to make the changes directly on the DNS server which is a very easy process.
Records Needed for Office 365 Services:
Records added in WordPress.com DNS server:
For adding records, I have just repeated the steps mentioned in Step 5 but chosen appropriate record types like A, CNAME, SRV etc as mentioned in the above snap.
Voila 🙂 We are done 🙂
Final snaps after the DNS records are updated.
In this article, we have learnt how to add a custom domain name to an existing Office 365 tenant.