If we have VPS or dedicated server having cPanel and your clients are requesting as their organization is using Office 365 for internal collaboration and for Email flow. They need to add  their domain.com domain to Office 365 tenant. In order to prove ownership of domain and have mail flow they need to update the MX record and TXT record.   In such cases the reference provided by Microsoft is available in the below link. Below is the steps I followed for Create Office 365 DNS records in cPanel server.


The above link explains how we can create MX,CNAME , SPF and SRV records in domain Name servers.  In this creation of SPF,MX, CNAME  records are very easy and most of them are familiar with the same.  The only confusion that may lies is for creation of SRV records.

Here we are only explains how we create SRV records in a WHM server with reference to Office 365 article.

The only main point we need to remember in our mind is in WHM DNS records area there is field for Service and Protocol if we select the record type as SRV. So in such cases we must specify the Service and Protocolvalues as the record’s Name value.

Now below screen shots will pretty much explains how it can be achieved.  We are also attaching the screenshots of domain verification at office365 prior to creating DNS records or if there any issue with DNS record syntax.  That means the in the screenshot we can see whether the verification is passed or failed.

So before we proceed with DNS creation ask clients to verify at office 365 with their domains so it will shows whether the DNS records are password or not and will also shows what’s the expected value is.  Reference the same it will help us to create the DNS records easily.

Screenshot at Office365 before DNS creation.

Screenshot of Office 365 DNS records at WHM after creation.

office 365 DNS Verification Passed after DNS creation