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?
13 Replies
a year ago
Do you have your SSL mode set to Full?
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
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
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
a year ago
that guide is for www.domain.com -> domain.com
you are trying to do domain.com -> www.domain.com, right?
a year ago
I have to ask, in 2025, why do you want to redirect to www?
a year ago
fair enough
a year ago
!s
Status changed to Solved brody • about 1 year ago