Subdomain redirecting to main Domain

Hi Guys,

I created a subdomain cdn.mydomain for adding CDN to my website, But after adding the CNAME It’s just redirecting to the main domain.

I tried creating it again. Still, it’s not working.

Any idea how can I fix it?

thanks

Hi, unfortunately this could be many things, could you please share your domain name so we can narrow it down?

Sadly, I’m not allowed to post links here

Here is the domain marketingly(dot)social

1 Like

So I don’t see a CNAME for cdn.marketingly.social but I do get A records to the Cloudflare proxy for it. (Could be from CNAME flattening feature).

When I navigate to cdn.marketingly.social, either there is a Cloudflare page rule/rewrite rule sending me a 301 redirect to marketingly.social or the cdn origin server itself behind the Cloudflare proxy is sending the 301 redirect.

1 Like


I have setup the cname as you can see on the image, As I didn’t setup any page rule for it. Don’t know what’s wrong.

Hmm, im not sure. The redirect looks like it is on the gcdn side of things. The Cloudflare proxy may be interfering with what gcdn is expecting to see since it is replacing the CNAME with the A records of the Cloudflare proxy. Could you see if disabling it helps? This would also prevent Cloudflare from inserting any redirects.

You mean I should delete cname?

I disabled the Cloudflare proxy still it’s same

Yeah, does not seem to have helped. It does confirm that the gcdn side is performing the redirect though.

But cname is not valid as i can check on other toolls

What tools are you using to check. They might be returning cached data. This one Dig (DNS lookup) showed the correct CNAME until a few seconds ago

Is your origin in gcdn “https://marketingly.social/” ? (HTTPS part is important as the http → https redirect may be causing this redirect problem with the cdn)

Hmm, I checked that but it’s not the issue.
Probably something wrong with CNAME.

After deleting the cname and setting up cdn again, It’s started working finally.
Thanks mate @corvin

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.