How do i set up CDN on a subdomain

I never got the option to do

when setting this Cloudflare up.

I asked in question HERE but i was told to set it up like

To be completely honest im not entirely sure how things like DNS records and nameservers communicate but one thing i don’t want is to mess up is my SEO.

SEMrush is a smart SEO company and they recommend connecting to a sub-domain so that my website doesn’t lose ranking power.

This is what i was trying to achieve, does anyone else do this? what are the Pros and Cons?:

Step#1: Set up CDN using your own subdomain
In your DNS setup, create a ‘custom domain,’ preferably a sub-domain for your website, like and use that as a CNAME. This ensures that CDN service exists on your own subdomain instead of one of the CDN provider’s subdomains, such as If you are not sure what this difference signifies, it is better that you ask the provider if they can install the service on your own subdomain. Most of the popular CDN services can be set up the way you want.

Enabling CDN using your own subdomain keeps the service proprietary to you and points SEO values of the CDN based resources to your root domain – instead of This approach maintains or even increases domain authority of your main site. This in turn boosts your SEO rankings. And of course, you are not bypassing your domain value to a third party CDN site while improving page speed.
Best Practices for Content Delivery Networks (CDN) SEO

And here is another article from Moz suggesting to do the same sub-domain thing

Another tip is to use a CNAME for your CDN URL. Typically, a CDN offers customers two options for their CDN URL: 1) a shared CDN URL name, which is automatically generated; or 2) a custom URL. Setting up a custom URL with a CNAME allows you to point your assets to a subdomain on your own domain such as

Here are a few reasons to consider using a custom CDN URL:

If you use a custom CDN URL, you can use a sitemap to view indexed images data in Google Search Console. If you use the default zone URL, you will not be able to view this data. You could still use the URL search operator, however.
You have full control over your custom CDN URL it and can switch CDN providers more easily while retaining the same URLs
A custom CDN URL can make for better branding, as people might see your image URLs. Also, for Google, it sometimes might be better to associate the domain on the same as your root site.

2 posts were split to a new topic: Bypass Cloudflare for part of a URL

Cloudflare acts as a transparent proxy/cdn. There is no separate url needed.

Instead of needing to use you can simply leave the URLs as they are pointing directly to your domain. There is no (or involved in the serving of the content.

You can set one up if you want. You can create a CNAME record for and point it to the same host as and then change the URLs for all your assets from to if your host will allow you to point 2 sites to the same subdirectory or you can move that content to another server/virtual directory. But it’s more work that doesn’t really provide additional value. But using a separate host name introduces an additional DNS lookup to resolve that host name, so it’s actually a bit slower to do that.

okay thanks for the advice.

I do SEO, so that;s always my main concern. After reading those two blogs they recommend doing that thing. But after changing my DNS to Cloudflare i havent noticed any ranking decreases. and its been about a week.

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.