502 Cloudflare - Railway subdomain
sarmanaulakh
HOBBYOP

3 months ago

Hey I have 2 projects. One pointed to sarmanaulakh.com and www.sarmanaulakh.com which works fine and the c names were added to cloudflare. Now I have a new project which I want to be on the same domain, but different subdomain. So finance.sarmanaulakh.com

this one gets a green cloud in railway, but a 502 on cloudflare page. Its setup is just the cname for this subdomain that was added to the same domain on cloudflare.

Cloudflare now has 3 cname records (base domain, www, finance).

How can I get finance to work/not throw Cloudflare error.

20a0bf5e-87a1-413e-9f99-787eba22ca01/service/9667cf06-3653-4cd1-8065-4dde32fc4e5d

0 Replies

Hi!

Are you able to access your website on a Railway provided domain? I suspect something is wrong with how you've set up Railway to serve your app.


sarmanaulakh
HOBBYOP

3 months ago

Yes the railway generated domain work


What port did you point the generated domain to, and what port did you point the custom domain to?


sarmanaulakh
HOBBYOP

3 months ago

Generated was 3000, custom I’m not sure


Remove the custom domain, and recreate it making sure you select 3000 as well. Then update the CNAME to the new value it's asking for.


sarmanaulakh
HOBBYOP

3 months ago

That worked!


Glad to hear it!


sarmanaulakh
HOBBYOP

3 months ago

Wow ok, I thought the custom domain port was auto detected to 3000


sarmanaulakh
HOBBYOP

3 months ago

Thanks!


Loading...