Support both apex and www on Azure CDN

Anoop A K 1 Reputation point
2021-05-04T16:39:22.3+00:00

I was able to setup custom apex domain using Alias pointing to Azure CDN.
Also was able to successfully add certificates that I purchased from a certified CA(externally) and imported that in to the key vault and linked to the CDN endpoint.
I also added a rule to redirect http to https.

Here is what works:
<domain name>.xyz successfully redirects to https://<domain name>.xyz

Here is what doesn't work:
www.<domain name>.xyz gives "our services aren't available right now. We're working to restore all services as soon as possible"
https://www.<domain name>.xyz gives certificate warning

How can I get www work as well?

Here is my Azure DNS settings

93663-image.png

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

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,261 Reputation points Microsoft Employee
    2021-05-07T19:32:36.6+00:00

    Hi,

    Try to create a CNAME record for www pointing to your CDN FQDN. Post that try adding the www.yourdomain.com to the CDN and check if that works.

    0 comments No comments