Azure CDN for website hosted in GitHub

Category: azure cdn

Question

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


Problem 1:

I have an Azure CDN njan-oru-malayali.azureedge.net for my website njan-oru-malayali.com, 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 njan-oru-malayali.azureedge.net. When I do that, I am getting an error as there is already an A record with njan-oru-malayali.com which points to GitHub server. To add the CNAME with njan-oru-malayali.com, 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 sibeeshpassion.com for which I had configured Azure Premium Verizon CDN with a custom domain cdn.sibeeshpassion.com. I can see that the images and all the files are being loaded from the cdn.sibeeshpassion.com when I visit sibeeshpasssion.com. But the Google Page Speed insight gives different result for both sibeeshpassion.com and cdn.sibeeshpassion.com. 

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.

Replies

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


Hi, 

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 ?

Regards, 
Msrini

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. 

Reference: https://docs.microsoft.com/en-us/azure/dns/dns-alias#point-zone-apex-to-azure-cdn-endpoints 

Regards, 

Msrini

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 cdn.sibeeshpassion.com 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. 

Regards, 

Msrini

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 cdn.sibeeshpassion.com? Won't it affect the Google Page Rank as the same content is been shared in multiple site (sibeeshpassion.com and cdn.sibeeshpassion.com) ?

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


Hi, 

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: https://docs.microsoft.com/en-us/azure/cdn/cdn-map-content-to-custom-domain

Regards, 

Msrini

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


Hi, 

You need to delegate your domain to Azure DNS and then you can assign apex domain to CDN. You can point your site to abc.domain.com 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 abc.domain.com is accessible directly from Internet. 

Regards, 

Msrini 

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


Hi, 

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. 

Regards, 

Msrini

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 (sibeeshpassion.com), 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 cdn.domain.com to Azure CDN . But now, it might affect your google rank. 

Regards, 

Msrini

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.

Regards, 

Msrini

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. 

Regards, 

Msrini