Redirect page rule for http, https, non-www, www

Hi,

I have a challenge configuring redirects with Cloudflare, which don’t work.
Community topics didn’t help either.

I want to make permanent redirects for my website1 to website2:

http://website1.comhttps://website2.com
https://website1.comhttps://website2.com
http://www.website1.comhttps://website2.com
https://www.website1.comhttps://website2.com

My current DNS:

CNAME www website1.com Proxied

My current Page rules:

*website1.com/
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://website2.com)
*.website1.com/
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://website2.com)

Please assist with configuration, currently neither of redirects work

Hi @romaleev,

This tutorial looks similar to what you are trying to do.

1 Like

UPDATE, config should be:
Correct DNS:

A www 192.0.2.1 Proxied
A @ 192.0.2.1 Proxied

Correct Page rules:

*website1.com/
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://website2.com )

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