2

I am hosting a static website using the following Azure Resources:

  • Azure Storage Account
  • Azure CDN
  • CDN End Points
  • DNS Zone

and my domain is purchased from GoDaddy.

The implementation is very straightforward:

  1. I deploy my static website to the storage account and all is fine I got my primary and secondary URLs which are both working fine
  2. In my CDN profile, I have created an endpoint pointing to my storage account URL and as a result, a new endpoint resource was created testing endpoint hostname works perfectly
  3. My DNS Zone is based on my GoDaddy purchased domains I already added the @ record of the type "A" and the www record of the type "A" as well also Azure automatically created 2 additional Cname Records for CDN verify purpose
  4. back to the endpoint that I created in the CDN I add 2 custom domains for my web site which are "example.com" & "www.example.com" both URLs work fine now and open the site hosted in the Storage account but it's happening over HTTP, not HTTPS
  5. I click on the www.example.com custom domain in the endpoint overview blade and from the new blade I select on for custom domain HTTPS and choose CDN managed and click on save after some time for verification it works fine and www.example.com is working over HTTPS
  6. repeating the same step 5 for the naked custom domain in the endpoint is not working as when I click on save it is throwing an error

We couldn't find a DNS record for custom domain that points to endpoint. To map a domain to this endpoint, create a CNAME record with your DNS provider for custom domain that points to endpoint.

My ultimate goal is to be able to open both www.example.com and example.com over HTTPS, if I can fix this error or perhaps follow an alternative implementation there is no problem with that, or if it's possible to redirect without a redirection server from the naked domain to the www it would be fine as well I am open to any solution.

I tried adding a cname with naked domain value to my DNS zone but I am learning that it's not possible as I have to provide a prefix to the .example.com when creating a cname in the Azure DNS zone.

  • I have a similar issue. Any workaround? Thanks! – Ramesh Murugesan Jul 22 '19 at 10:28
0

You can go to your DNS settings and add a new A record with blank name. You will have to select Alias type and pick your CDN resource.

Then after you can go back to your CDN and add the custom domain.

https://azure.microsoft.com/en-us/blog/announcing-alias-records-for-azure-dns/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.