redirecting root domain to www

armster15
PRO

5 months 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

0 Replies

armster15
PRO

5 months ago

3748ea1a-2245-4b3a-b098-d3a49a2b9db7


5 months ago

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


armster15
PRO

5 months ago

i know 😢 but all my seo is on www 😭


5 months ago

are you using cloudflare?


armster15
PRO

5 months ago

ya


5 months ago

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


armster15
PRO

5 months ago

no just the www


5 months ago

add both, and then setup a page rule in cloudflare


armster15
PRO

5 months ago

oh ok got it ty!


armster15
PRO

5 months ago

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


5 months ago

railway doesnt provide a way for you to setup redirects


5 months ago

but you still need the root domain there for ssl


armster15
PRO

5 months ago

ohhhh


armster15
PRO

5 months ago

makes sense


armster15
PRO

5 months ago

thanks it worked!


armster15
PRO

5 months ago

my vercel to railway migration is finally complete 😎


5 months ago

hell yeah, love to hear it


5 months ago

!s


Status changed to Solved brody 5 months ago


redirecting root domain to www - Railway Help Station