Page rules for flattened CNAME (apex/root) subdomain

I have a subdomain which has been delegated to Cloudflare’s nameservers. All verified and active. I’ve got a Google Cloud Storage container set-up with that subdomain and I’m putting it behind Cloudflare to be able to provide it with an SSL certificate.

The problem that I’m experiencing relates to page rules. I want to set-up a rule such as:

something.example.com/*/index.html

which does a redirect (301) to

https://something.example.com/$1

The problem is that whenever I try to apply the page rule, I get a 1004 error relating to DNS validation. There is no A record because of Google Cloud Storage - so something.example.com has to be a flattened CNAME to c.storage.googleapis.com.

I have a working site, but the problem is that I can’t do anything with page rules because of DNS validation.

Is there any way I can get around this problem?

Many thanks,

Martyn

Well there’s no $2 in that example only a $1, perhaps the error related to that and not DNS.

You’re absolutely right. I was trying to reproduce another, similar rule, from another account and mucked it up.

Many thanks for your help!

Martyn

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