Issue with a static page using a root domain in Azure CDN and DNS zone

Marc Cortada 21 Reputation points
2020-11-21T21:21:08.353+00:00

Hello,

I have an issue with a static page trying to use the root domain in Azure CDN.
• This URL works: https://markcortada.azureedge.net/
• This URL also works: https://www.markcortada.com
• But this does not: https://markcortada.com

The response code is 400 and the response body is:

<h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>0Qim4XwAAAACqEsBrRU//Tpz70Wiwo+RoQlJVMzBFREdFMDQwOABFZGdl

Doing the request in http instead of https I get the same result (the code is different in each request).

The root domain is set using the Azure DNS zone and the A record seems to point to the correct Azure resource (the CDN). These are the meaningful records:
• CNAME www -> markcortada.azureedge.net
• CNAME cdnverify -> cdnverify.markcortada.azureedge.net
• @ A Azure CDN (Alias resource type) and target alias markcortada

It seems that the ip is properly resolved, but the service does not respond with the content that belongs to the domain.

Am I doing anything wrong? Am I missing any configuration?

Thanks in advance.

Azure Content Delivery Network
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 47,011 Reputation points Microsoft Employee
    2020-11-27T16:26:56.657+00:00

    Hello @Marc Cortada ,

    In order for your root domain to work with Azure CDN, you have create an alias record for your root domain and then onboard the root domain to Azure CDN endpoint as mentioned in the below article:
    https://learn.microsoft.com/en-us/azure/cdn/onboard-apex-domain

    And for HTTP, you can elect to redirect HTTP traffic to HTTPS by creating a URL redirect rule with the Standard rules engine available for Azure CDN from Microsoft profiles as below:
    https://learn.microsoft.com/en-us/azure/cdn/cdn-storage-custom-domain-https#http-to-https-redirection

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful