Cloudflare Bulk Redirect Rules
allcentury
HOBBYOP

a year ago

I'm following this guide: https://docs.railway.com/guides/public-networking#adding-a-root-domain-with-www-subdomain-to-cloudflare

I'm able to get most of it working except when I enable the bulk redirect rule in cloudflare it does a 301 endless loop and eventually gives up. If i turn off, my domain works but I'm not able to get www to work.

Bulk redirect rule is pretty simple, its:

Source: https://mydomain.com/
Target: https://www.mydomain.com
Status: 301
Params: All enabled

Anyone else run into this?

Solved

13 Replies

allcentury
HOBBYOP

a year ago

366ad74c-a280-40ef-bebb-04ef72d94ee4


a year ago

Do you have your SSL mode set to Full?


allcentury
HOBBYOP

a year ago

yes, i was using Full (Strict) but I saw another thread that said it was problematic and after setting it to Full it works fine on the non-www


allcentury
HOBBYOP

a year ago

can you confirm that I only set up the apex domain in railway? With a page rule set to redirect mydomain -> www.mydomain.com I see the 301 redirect but then I get a 404 with a railway splash screen, example request id: S0Thmw6QBO4fgkLY2XW0g1850849526


a year ago

you need both the root domain and the www subdomain in railway


allcentury
HOBBYOP

a year ago

this says to only create the Apex - do you want me to update the docs? https://docs.railway.com/guides/public-networking#adding-a-root-domain-with-www-subdomain-to-cloudflare


allcentury
HOBBYOP

a year ago

because then i assume the page/bulk rule is useless


a year ago

that guide is for www.domain.com -> domain.com

you are trying to do domain.com -> www.domain.com, right?


allcentury
HOBBYOP

a year ago

yes i am - didn't notice the difference till you just pointed it out 😅


a year ago

I have to ask, in 2025, why do you want to redirect to www?


allcentury
HOBBYOP

a year ago

convention and i'm old?


a year ago

fair enough


a year ago

!s


Status changed to Solved brody about 1 year ago


Loading...