Adding Office 365 DNS Records via WHM or cPanel

Office 365 has quickly become a popular option for clients requiring Exchange hosted email. As a result, we frequently see tickets seeking help with setting up the required DNS records. Even if you’re familiar with editing DNS zones, the required SRV records may¬†throw you off.

Microsoft does provide a general guide for all of the necessary DNS records here but it doesn’t specifically address adding them via WHM or cPanel. If you have WHM access, using the “Edit DNS Zone” link under “DNS Functions” on the left menu will be the easiest option. From there you can add the necessary records at the bottom of the page. You will have to do this in batches since there aren’t enough fields to add all of the records in at once. Once you’re done, the added records should look like this:

You’ll notice we’re using “” as the domain there. Your own records will instead use your own domain. The “msXXXXXXXX” value is provided by Microsoft to verify your domain, yours will have numbers instead of the placeholder X’s. When editing DNS records via WHM, you should always put quotes around TXT values, as can be seen in the SPF record above. You’ll notice the other “MS=” TXT record doesn’t have quotes shown, that’s because they were automatically removed since they were not needed in that case. With WHM, you’re best off putting quotes around the TXT values and letting WHM decide what to do.

If you don’t have WHM access with your host, you can use the Advanced DNS Zone Editor via cPanel to add the necessary records. The records should end up looking like this:

One important difference to note, is that you must not include quotes around your TXT record values when adding them via cPanel. This can be confusing since WHM handles this differently.

Once you’ve setup all of the required DNS records, you should be all set. Just make sure that you remove any prior MX records so that email can begin flowing to Office 365. Of course, if you run into any problems please submit a ticket and we’ll be happy to help.

Leave a Reply