Page Rules not working for www redirect

I am using Google Sites, which doesn’t support non-www. URL’s. So, I’m using Page Rules to redirect, except it’s not working.

Forwarding URL (Status Code: 301 - Permanent Redirect, Url:*)

CNAME - www -

Any help is appreciated!

(As a side note, I tried and it worked, but not for https://)

should be…
Forwarding URL (Status Code: 301 - Permanent Redirect, Url:$1)

Although page rules will be deprecated at some point so consider using redirect rules instead, copy this one…

Thank you! I tried creating a Redirect Rule (for ‘all incoming requests’) like in the instructions you linked to (type Dynamic, redirect to 301, preserve query string turned on), and when I click Deploy, I get this error (in a red bar at the bottom of the page, and it won’t let me save or deploy):’ is not a valid value for target_url because the expression is invalid: Filter parsing error (1:1): ^^^^^ unknown identifier (Code: 20083)

Note: I turned off the Page Rule, as per your advice.

Now I keep getting a redirect error, even when the Page Rules are switched to OFF. I think there’s a glitch in the Page Rules!

I really need to resolve this… Any idea are appreciated! Thank you!

Show a screenshot of your redirect rule (or page rules if using those).

I wasn’t able to save the Redirect Rule because of the error I mentioned.

Here is the Page Rule (screenshot: cloudflare.jpg - Google Drive )

In case it’s helpful, when SSL is set to Full it gives me a SSL handshake error, and when I change it to Flexible or Off, I get a redirect error. The site is on Google Sites.

Thanks for your help!

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