Sibi Paul
Sibi Paul

Reputation: 31

How can I use Azure CDN to deliver my entire site with root domain?

I created Azure CDN Verizon Premium.

Endpoint Hostname: https://mysitename.azureedge.net
Origin Hostname: https://mysitename.com
Origin host header: 123.456.789.12 ( My Server IP )
My Server is: CentOS + Litespeed
DNS Provider: Cloudflare

Normally, I point to my server from CF DNS

A - @ - 123.456.789.12
CNAME - www - mysitename.com 

With these settings, I can access my site (NO proxied)

I wish to use Azure CDN for the root domain.

I don't like to use www.mysitename.com, But I like to use root/naked domain (mysitename.com)

So, I changed my DNS like this:

CNAME - @ - mysitename.azureedge.net
CNAME - www - mysitename.azureedge.net 

Thanks to CNAME flattering in Cloudflare

(This technic worked with QUIC.Cloud CDN - when I used their NODE URL on CF DNS) NB: Quic.cloud is still in Beta - But a nice service - worth trying.

So, I used the same trick to have in Azure CDN (I don't know it'll work or not)

After I put the endpoint hostname in my browser, I get a 504 timeout error. As you know, Azure is NOT allowing an SSL certificate on the root domain.

So, how can I fix this trouble?

What do exactly I want

A dynamic CDN, Not the traditional URL mapping CDN.

Need to deliver the entire files & folder to edge locations (Verizon & Akamai Dynamic Delivery)

Why don't like to use URL mapping

The site on a root domain and CDN in a subdomain is possible.

Ex: site URL mysite.com & CDN URL: cdn.mysitename.com (currently I'm using this setup in few sites)

But, the real problem is:

the CDN URL will be quick, Files can be delivered. But, The Website root domain, still deliver from the origin server.

So, TTFB is delayed when users from India access the site hosted in the USA.

Did you find a solution?

Yes, Cloudflare & QUIC is the best solution for this, because they both work through DNS level.

Cloudflare asks us to point our domain to theirs NS and they deliver dynamically (if proxy is enabled)

Each country has better TTFB than, origin (I tested with CF)

But why am I not using Cloudflare?

Cloudflare has some SEO issues. I faced many times on many occasions. CF is fast but dropped my ranking suddenly.

Why I'm not using QUIC.Cloud?

I'm using Quic on some small sites. It works well.

QUIC works, by pointing CNAME to their NODE URL (Their DNS solution is on the way). The entire site will be delivered through its node.

But, It's still in beta and not capable to deliver my requirements always as I expected. Maybe they will fix small bugs asap.

Then, what do you want?

I need to deliver my entire site through CDN. so I can increase the TTFB in every location. CDN for the root domain is the solution (I think so)

CNAME to endpoint hostname will work?

is there I miss anything, in my DNS or Azure CDN setup?

Upvotes: 3

Views: 1370

Answers (1)

Erndob
Erndob

Reputation: 2612

You need to have your DNS managed in Azure, and then create an Alias record for the root domain, pointing to the CDN.

https://learn.microsoft.com/en-us/azure/dns/dns-alias

After that you will want the SSL certificate, it is allowed on root domain, but it's not managed by Azure and you need to upload it to the Key Vault and bind it through that.

https://learn.microsoft.com/en-us/azure/cdn/cdn-custom-ssl?tabs=option-2-enable-https-with-your-own-certificate

Upvotes: 0

Related Questions