Page Rule Redirects are not working

We have recently moved our website to hubspot and they only support www.example.com

Now we have created a CNAME record to point
to www subdomain to hubspot given and it’s working.

Now we want to migrate all the non www requests to www requests.
For that, we have created a page rule which forwards
all URLs to
https://www.example.com/$1

and this rule is not working. For the time being, we have created a forwarding rule in redirect.pizza and configure that redirects.pizza IP address as a root IP address and configure the redirect in redirect.pizza.

Redirect pizza setting is working but not cloudflare. I do not wants to use the redirect.pizza for such a small task.
Can anyone help us?
Thanks

I like pizza, but a slice of pizza doesn’t give me enough information to see what’s going on. A real domain name would.

It’s possible that the naked domain isn’t proxied, which means the Page Rule won’t apply.

1 Like

Thanks, here is the complete information.

If you have had CNAME for @ and WWW, like the cPanel adds it when using some Hosting providers, remove them in CloudFlare DNS Dashboard when the domain is added to CloudFlare and pointed to CloudFlare nameservers.

Add and point @ and WWW to IP via A record.

Will work fine with that, at least for me works for 50 websites like that.

Also, if the domain or sub-domain does not exist on the hosting account, and not even added A record for it and pointed to the right IP address in CloudFlare dashboard, the Page Rule for “forwarding URL” will not know and won’t work like that.

Also, check the “gray” and “orange” Clouds, when using CloudFlare try to switch them to “gray” when using CNAME and CloudFlare :slight_smile:, or at least to make it work with page rule over CloudFlare, then “orange” should be it.

As an example, regarding the CNAME and CloudFlare, example of Google Cloud Storage CNAME, it does not have SSL. So to serve files over HTTPS from GCS and have SSL (Flexible) over the CNAME that points to GCS, the cloud has to be “orange”.

Hope it helps a bit.

ovaledge (without ‘www’) is not proxied by Cloudflare. Those requests go straight to your Caddy server. The good news is that Caddy is doing the redirect for you.

Is everything ok now?

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