14 days ago
I have a few services working fine on railway, but i've been unable to get a custom domain working with my latest project. It seems to be setup exactly as my other projects so i'm not sure what is wrong.
the domain is hellthcat.com
all requests return 502 with x-railway-fallback: true, indicating the edge router can't match the hostname to the service.
What works:
- https://web-production-664f.up.railway.app returns 200
- Service healthcheck passes (status: SUCCESS)
- Domain shows verified in dashboard (CNAME target: wdnh3bj6.up.railway.app)
What doesn't work:
- https://hellthcat.com returns 502
- Hitting Railway's IP directly with Host: hellthcat.com also returns 502 with x-railway-fallback: true
- Redeploying the service doesn't fix it
- Deleting and re-adding the domain didn't fix it
DNS: CNAME hellthcat.com → wdnh3bj6.up.railway.app (via Cloudflare, SSL mode Full)
Pinned Solution
14 days ago
At this point I’d just try making your application listen to a different port and change the URL’s port as well.
6 Replies
14 days ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • 14 days ago
14 days ago
Make sure the port your URL is mapped to is the same port your application is listening to.
0x5b62656e5d
Make sure the port your URL is mapped to is the same port your application is listening to.
14 days ago
Yeah i think that is set correctly - I'm exposing port 80 in my dockerfile and the railway.app domain also on port 80 works fine
aaronzimmerman
Yeah i think that is set correctly - I'm exposing port 80 in my dockerfile and the [railway.app](http://railway.app) domain also on port 80 works fine
14 days ago
Try disabling the proxy in your Cloudflare DNS.
0x5b62656e5d
Try disabling the proxy in your Cloudflare DNS.
14 days ago
I've tried this a few times, when the proxy is enambled, i get the cloudflare error page saying the web application threw a 502. WHen i turn off the proxy, I get the railway "Application failed to respond" error.
14 days ago
At this point I’d just try making your application listen to a different port and change the URL’s port as well.
0x5b62656e5d
At this point I’d just try making your application listen to a different port and change the URL’s port as well.
14 days ago
This worked.... weird, but glad it's working now, thanks!
Status changed to Solved 0x5b62656e5d • 14 days ago
