Custom Page Rule

I am relatively new to working with Cloudflare. I need help creating a page rule.

Currently if you go to a webpage on my site: Outdoor Letter Board Display Cases Standing 2-3 Doors Free Shipping – Displays4Sale

I get taken to an error screen. It is because the www. is missing at the beginning of the URL. If I switch it to

the page loads fine. How can I write a rule that fixes this? Mind you this is for all pages so I would need to shorten the URL down to where StoreModules is and add an asterix (as a wild card character)

I believed that I should be able to add a 301 redirect to include the www. in the beginning and replace the asterix with $1 but for some reason I still get taken to an error screen.

Please help

1 Like

I have tried your recommendation. When I follow these steps my site loads very slowly, almost as slow as an old dial up modem used to load. If I remove the DNS (from Step 1) the site loads fine again, but I still get that error.

The page rule looks okay. Post a screenshot of your DNS records.

There is a worker exception. That is a completely different issue. Check out the worker you have deployed.

Ok, Thank you. I am not sure how to do that as it was done by a 3rd party company a while back. This project was dropped on my desk and I am just trying to pick up the pieces.

The issue is not the redirect but the loading of “www” in general and that would point at your server.

I’d recommend to pause Cloudflare altogether (bottom right on the Overview screen) and first sort out any issues with the site. Once it is loading fine you can unpause and check out any potential issues on Cloudflare.

Thank you again Sandro. I will follow your advice.

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