redirecting root domain to www
armster15
PROOP

a year ago

Hi, apologies this is probably a silly question but i want to make sure i do this right to prevent my service from going down

I want to redirect "example.com" to "www.example.com". right now, i have www configured in railway and everything is cool but i don't have the redirect for example.com to www.example.com configured. how would i go about this?

Solved

18 Replies

armster15
PROOP

a year ago

3748ea1a-2245-4b3a-b098-d3a49a2b9db7


brody
EMPLOYEE

a year ago

in 2025 why is there a need to redirect to www, if anything you would redirect away from www


armster15
PROOP

a year ago

i know 😢 but all my seo is on www 😭


brody
EMPLOYEE

a year ago

are you using cloudflare?


armster15
PROOP

a year ago

ya


brody
EMPLOYEE

a year ago

and do you have both the root domain and www subdomain added to your railway service?


armster15
PROOP

a year ago

no just the www


brody
EMPLOYEE

a year ago

add both, and then setup a page rule in cloudflare


armster15
PROOP

a year ago

oh ok got it ty!


armster15
PROOP

a year ago

out of curiosity since im adding the root domain to railway as well why the need for the cf page rule


brody
EMPLOYEE

a year ago

railway doesnt provide a way for you to setup redirects


brody
EMPLOYEE

a year ago

but you still need the root domain there for ssl


armster15
PROOP

a year ago

ohhhh


armster15
PROOP

a year ago

makes sense


armster15
PROOP

a year ago

thanks it worked!


armster15
PROOP

a year ago

my vercel to railway migration is finally complete 😎


brody
EMPLOYEE

a year ago

hell yeah, love to hear it


brody
EMPLOYEE

a year ago

!s


Status changed to Solved brody 12 months ago


Loading...