External DNS records required for email in Office 365 (Exchange Online)

Copper Contributor

Hi all,

we have a configuration with an OnPrem Exchange Server 2019 Infra in hybrid with Exchange Online.

Looking at the MS documentation avaliable at this link: External Domain Name System records for Office 365 - Microsoft 365 Enterprise | Microsoft Learn

it refers to a CNAME record needed to "Helps Outlook clients to easily connect to the Exchange Online service by using the Autodiscover service when your company is using Exchange federation. Autodiscover automatically finds the correct Exchange Server host and configures Outlook for your users."


Alias: For example, Autodiscover.service.contoso.com
Target: autodiscover.outlook.com


What exactly do this record? Is it needed in a Hybrid configuration that uses federation between Exchange OnPrem and Exchange Online?

12 Replies
Make sure that you point the autodiscover URL to the Exchange on-premises server as long as you have mailboxes located on-premises. If all mailboxes are in the cloud, autodiscover can be pointed to Exchange Online

Hi @eliekarkafy, thanks for your reply.

The configuration of the autodiscover service in a hybrid configuration is clear.


I'm specifically referring to the CNAME record autodiscover.service.contoso.com (where contoso.com is your mail domain) only.

What's the scope of this record? And in which scenario is configured?

autodiscover allows outlook to automatically detect the user mailbox settings without manual intervention, if you're in hybrid mode and you still have mailboxes on-premises you need to point your Autodiscover record to on-premises.

you didn't replied to my question. Anyone can clarify the scope of autodiscover.service.contoso.com CNAME record? Thanks

this CNAME record is used only if your company is using Exchange federation.

you're mentioning what can be found in the documentation i linked in my first post, this is not useful.
In a Hybrid Configuration Exchange OnPrem and Exchange Online are federated. Does this mean that this CNAME record is recommended? If yes: is it recommended also if part of mailboxes are online and part are onprem? Which is the configuration seggested for the record? Must it point to autodiscover.outlook.com?

it depends where your MX record is located and if you still have mailboxes on-premises? what in your use case scenario in order to suggest you what should the DNS record look like. the autodiscover.service.contoso.com is alias you can use it if needed the main DNS CNAME record for hybrid scenario is Target: autodiscover.outlook.com if your mx record is pointing to O365

Elie is 100% correct. The documentation that you refer to is related to external DNS and in a scenario where all mailboxes are located in Exchange Online and none are located in on-premises Exchange. If that is your scenario, then create a CNAME record for autodsicover.<your domain> that points to autodiscover.outlook.com.
If you have mailboxes located on-premises (even if it's just a few) then you need to keep the external DNS record for autodiscover pointing to your on premises Exchange server. You will need to keep this configuration in place until all mailboxes are migrated to Exchange Online (or at least all those mailboxes an Outlook client connects to)

Hi @Dan Snape thanks for your reply.

I managed (and actually manage) a lot of hybrid configurations. No doubt on how autodiscover must be configured based on the scenario.

My question is related on the autodiscover.service.contoso.com CNAME record only.

Please read!!! I'm not referring to autodiscover.contoso.com, i'm referring to autodiscover.service.contoso.com

If i've OnPrem mailboxes in a hybrid scenario, do you mean i've to create a CNAME record for autodiscover.service.contoso.com that point to the Exchange OnPrem web services?

I never create this record, everything works fine, the record is suggested based on the MS documentation. What's the purpose of autodiscover.service.contoso.com record? Which is the difference from autodiscover.contoso.com?



No you don't. I believe that's just an error in the article. You should use the "Submit feedback" option to get it fixed (Microsoft will update it very quickly)

Hi @Dan Snape, thanks for your reply.

I also thoungh it's just an error.

But this CNAME record is mentioned in two Microsoft documentation pages.

Here: External Domain Name System records for Office 365 - Microsoft 365 Enterprise | Microsoft Learn


here: Explore the DNS records required for client configuration - Training | Microsoft Learn

In the second one it refers to the CNAME autodiscover.service.adatum.com for Exchange Federation as "needed when you deploy Exchange in a hybrid configuration with Microsoft 365"

That's a news for me, never configured "autodiscover.service.adatum.com" in any Hybrid Configuration and federation works fine.

It's not mentioned in the M365 admin portal when you you look at the required DNS records for a custom domain. Maybe Microsoft can provide more insights...perhaps it's for a future product/configuration