Azure CDN for website hosted in GitHub

Category: azure cdn


Sibeesh Venu on Fri, 14 Jun 2019 11:32:21

Problem 1:

I have an Azure CDN for my website, which is hosted in GitHub. To add a custom domain for my CDN, we need to create a CNAME in my Domain Provider settings which points to When I do that, I am getting an error as there is already an A record with which points to GitHub server. To add the CNAME with, I need to remove the A record, but if I do so, how will the Azure contact with GitHub? I am a bit confused here? Should I use only the custom sub domains for CDN? Can't it be done with APEX domain?

Problem 2:

I have another website for which I had configured Azure Premium Verizon CDN with a custom domain I can see that the images and all the files are being loaded from the when I visit But the Google Page Speed insight gives different result for both and 

I have a feeling that if I have configured the CDN correctly, I would have the same score for both. Can anyone please let me know how this works? Thanks in advance.


msrini - MSFT on Fri, 14 Jun 2019 11:38:44


Do you want to point your Apex domain to CDN?

Are you find to add a CNAME with www with your custom domain?

What is the CDN provider are you using ?


Sibeesh Venu on Fri, 14 Jun 2019 12:18:10

I use Azure CDN (Standard Akamai). Shouldn't I point my Apex domain to CDN? What is the best way to configure?

msrini - MSFT on Fri, 14 Jun 2019 13:25:36

Pointing Apex domain to Akamai CDN is currently not supported. 




Sibeesh Venu on Fri, 14 Jun 2019 16:21:33

We are suppose to get an InvalidQueryParameterValue error, when we actually try to load the cdn host name in the browser? Can you please tell me what are the differences in the Origin type of the Azure CDN endpoints? It is regarding the Problem 2 mentioned in the question. I selected Origin type as Custom Origin, at the end my is treating as a different website?

msrini - MSFT on Sat, 15 Jun 2019 11:52:06

The Origin type is basically the Backend of CDN. Since it is a GitHub site, Custom Origin is the correct type which you have selected. 

As you mentioned in the Problem 2 statement, I see a significant improvement when you use CDN rather than the site directly. Let me know if you have any further questions. 



Sibeesh Venu on Sun, 16 Jun 2019 18:25:46

Thanks for your answer. So are you saying that, it is as expected that we are able to access the entire site by going to Won't it affect the Google Page Rank as the same content is been shared in multiple site ( and ?

msrini - MSFT on Mon, 17 Jun 2019 04:59:56


Yes, That's why you have created a CDN profile and added the Custom domain to it. If you are worried about the rank, maintain one Custom domain and assign it to CDN. 

You can also map apex domain to CDN now. Here is the reference:



Sibeesh Venu on Mon, 17 Jun 2019 06:03:12

Thanks. Again, now I am back to my first question, to add a CNAME with APEX domain with cdn host name, I should delete the A record DNS entry. But if I do that, how will my domain and GitHub talks to each other?

msrini - MSFT on Mon, 17 Jun 2019 07:14:32


You need to delegate your domain to Azure DNS and then you can assign apex domain to CDN. You can point your site to and then add that domain to the CDN origin. 

By doing this you can have the good Google ranking for the apex domain. But still is accessible directly from Internet. 



Sibeesh Venu on Mon, 17 Jun 2019 07:57:57

Thanks. When you say that I need to delegate my domain to Azure CDN, you meant that I need to change the A record of my both APEX and www domain to Azure DNS right? 

If I do that I am losing the current hosting (GitHub or Any other) right? And move everything to Azure? 

msrini - MSFT on Mon, 17 Jun 2019 08:36:30


Delegation means, all record will be hosted on Azure and you need to provide NS record of the Azure to your Registrar. Once you delegated your domain, then you can create a Alias record pointing to Azure CDN. Then you can create a www record to point to your site. 



Sibeesh Venu on Mon, 17 Jun 2019 11:14:49

Thanks for your reply. I had already paid for a 10 year hosting with a different Hosting provider for my site (, basically I can't just move my site to Azure. Are there any other ways?

msrini - MSFT on Mon, 17 Jun 2019 11:16:15

The other way is just pointing to Azure CDN . But now, it might affect your google rank. 



Sibeesh Venu on Tue, 18 Jun 2019 17:58:03

Thanks for all of your replies.

msrini - MSFT on Tue, 18 Jun 2019 18:52:28

Hi Sibeesh, 


Please 'Mark as answer' if any of the replies helped, so that others in the community who are looking for similar question, can benefit from it.



Sibeesh Venu on Wed, 19 Jun 2019 05:23:14

Unfortunately those solutions are not helpful for me, I can not either move my hosting to Azure or have the cdn profile as a website. I need to find a different way to achieve this. I will post the answer here, if I find any. 

msrini - MSFT on Wed, 19 Jun 2019 05:29:58

Thanks, That would be Great.