How to point your DNS zone apex (root, naked domain) to Azure CDN endpoint?

DC 6 Reputation points

I would like to point both and to my CDN endpoint. I don't see how this can be done via Azures DNS zone.

Has anyone done this and is there a simple solution?


Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
631 questions
Azure Content Delivery Network
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. suvasara-MSFT 10,026 Reputation points


    You should use alias records to point your DNS zone apex to Azure CDN endpoints. If your domain DNS provider does not support alias record for root domain, you could optionally to host your domain in Azure DNS.

    In the Azure DNS zone, you could create an alias record like this,


    After the records are verified, you could add the hostname in the custom domain of your CDN endpoint.
    Alternatively, you could try the workaround in this blog.

    If you would like to provide a feedback on this feature then I would recommend you to up-vote this feature here in this Azure feedback section.


    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

    1 person found this answer helpful.

  2. DC 6 Reputation points

    Simple Solution:

    On the CDN endpoint page, under Settings in the side bar, select Rules Engine.

    Configure a rule to redirect the to

    • Add Rule
      -> Add condition -> Request URL (Operator: Equals; Request URL:; Case Transform: to lowercase)
      -> Add action -> URL redirect ( Type: permanent redirect; Protocol: HTTPS; Hostname:

    That was it. Redirection works fine.

    1 person found this answer helpful.
    0 comments No comments

  3. DC 6 Reputation points

    Thank you for your quick response.

    I have done exactly what you suggest and I am using Azure for DNS. But this solution you propose becomes a problem when you the apex custom domain to the CDN endpoint. CDN will NOT provide the certificate for the apex domain (by design).

    The only option that I have found is to create a certificate and set everything up in a common AD. However, I am not totally convinced that will work correctly either.

    Being able to have CDN support licensing (shared or otherwise) for the apex domain on the endpoint would be a better solution. Having DNS handle the mapping of the apex to the appropriate submain would ideal.

    I have seen postings where some people considered leaving Azure and moving to other hosting services where this is far simpler. However, that is not my intention, but I do really need this to work. Given the state of the documentation, very wordy and usually a out of date, I wanted to reach out and see if this problem had been solved any someone. Knowing that there is a working solution would help.


    0 comments No comments