Exclude from page Rules


I have many subdomains in my Main domain, so I want now to forward all of them to www, is there any way to do that, forward all subdomains except the www.
if I put an asterisk in the first link like this “*.example.com” , it will include www also.

Hi @a.mulki,

So to confirm, you want to forward all your subdomain.domain.com to www.subdomain.domain.com? Are you aware that this won’t work with Cloudflare Universal SSL if you are using it due to Subdomain too deep?

For this you may need to use 2 page rules, first of-course the www.example.com and second .example.com/ to forward it to www.example.com/$2

For the first rule you may need to use to set up anything.

@domjh : No I just want to forward all traffic from subdomain.example.com to www.example.com .

@eldhose : I already tried the same things but i thinks it’s not worked :

1 www.example.com/ => Always Use HTTPS On

2 .example.com/ => Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://www.example.net/$2)

I just tried another domain to insure everything working without any problem , but still after that www.example.com forwarded to www.example.net .

did I missed something ???

That makes sense, thanks for the clarification.

I just tested this and it worked for me for all :orange: subdomains and didn’t affect www.. The first rule is just a dummy and it doesn’t matter what the setting is as long as they don’t affect anything.

1 Like

then use subdomain.example.com/* to forward to www.example.com/$1 using 301 or 302 as your wish.

didn’t that work? hope your subdomain.example.com is a proxied one.

1 Like

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