azureazure-cdnazure-dns

Azure DNS Zone - unable to find CDN endpoint in list when adding record


I've setup a static site with Azure WebsiteCDN with custom domain, which works correctly for www.mysite.com

Now I'm trying to create an alias record set in DNS Zones (to point to apex domain) however the list is always empty:

enter image description here

Any ideas why it doesn't show up?


Solution

  • Mapping your apex or root domain to your CDN endpoint basically requires CNAME flattening or DNS chasing. There are other DNS providers as well that support CNAME flattening or DNS chasing, however, Azure CDN recommends using Azure DNS for its customers for hosting their domains. Refer : https://learn.microsoft.com/en-us/azure/cdn/onboard-apex-domain

    If you are using a different provider than Azure DNS, then you would need to contact the DNS provider and check if they support CNAME flattening or if there is any way to achieve this on their end.

    If it is not supported with your DNS provider, then you could delegate your domain to Azure DNS and manage your DNS records in Azure DNS and here you will be able to create an Alias record which will help you onboard your apex domain to Azure CDN.

    Please refer : https://learn.microsoft.com/en-us/azure/dns/dns-domain-delegation https://learn.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns

    While selecting the CDN resource in alias record set, make sure you have selected the subscription in which the CDN endpoint is deployed.

    Important Note : Pointing a zone apex to CDN endpoints for Azure CDN from Akamai is currently not supported. Refer : https://learn.microsoft.com/en-us/azure/dns/dns-alias#point-zone-apex-to-azure-cdn-endpoints