question

MichelleBlum-2831 avatar image
1 Vote"
MichelleBlum-2831 asked MichelleBlum-2831 answered

Adding root domain into Traffic manager for App Services

I have added my root domain into my App Services through A host records (for example mydomain.com). These App Services are the backend of a Traffic Manager profile for which I need to add the same custom domain into Traffic Manager. It seems that root domains don’t support CNAME records (https://ns1.com/resources/cname#:~:text=A%20CNAME%20cannot%20be%20placed,never%20to%20an%20IP%20address), and also based on the docs Traffic Manager requires CNAMEs…

How can I my root domain it into Traffic Manager since it only supports CNAME, and that type of domain does not work with CNAMEs so it gets routed to my backend App Services?

Note: This question is being posted as part of an internal effort at Microsoft to share emerging content with the community. A Microsoft employee will be following up with an answer shortly. If you have feedback regarding this issue, we encourage the community to start a discussion in the comments.

azure-webapps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichelleBlum-2831 avatar image
1 Vote"
MichelleBlum-2831 answered

As you well said, CNAMEs are not supported for root domain and also only CNAME records are supported for Traffic Manager: https://docs.microsoft.com/en-us/azure/app-service/configure-domain-traffic-manager.

Due to that limitation this scenario can be challenging, so here is a process that you could use, but the requirements are quite strict.

Requirements

-Your domain should be hosted in an Azure DNS zone to be able to use Azure DNS Alias set (https://docs.microsoft.com/en-us/azure/dns/dns-alias)

-Traffic Manager endpoints cannot be “App Services” they have to be setup as external endpoints

Process

Once you have the custom domain already mapped to the App Services as they are a once off operation, you can proceed with the setup of the Traffic Manager. Create the endpoints , but select the Type as External Endpoint and configure the Custom Header Settings. As FQDN select the Inbound IP of the App Service.

Image

Then if you go to Azure DNS create an A record @.mydomain.com (your root domain) and click on Alias Record Set “Yes” like in the following screenshot, selecting the Traffic Manager Profile. The effect that this will have is that it will update the Public DNS once it is done.

Image



image.png (160.7 KiB)
image.png (69.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.