Redirection (Page rules) from domain root to www

pagerules

#1

Hey Cloudflare Community,

I have an issue with my Page rules. I’d like to reddit domain.app to www.domain.app thanks to forwarding URL (301). I configured it according to the screenshot below :

Do you know what I have done wrong?

Thank you so much for your help!


#2

You shouldnt have the leading asterisk. That will match www too.


#3

Ok I understand well I should correct this by creating 2 pages rules ?

1- *magma.app -> https://magma.app/
2- https://magma.app/ -> https://www.magma.app/

Am I correct?


#4

More or less, though for #1 you could also use https://support.cloudflare.com/hc/en-us/articles/200170536-How-do-I-redirect-all-visitors-to-HTTPS-SSL- and https://blog.cloudflare.com/how-to-make-your-site-https-only/