hasanmuradi
PROOP
4 hours ago
Hi,
I am trying to connect a custom domain to my Railway frontend service (HTML/CSS/JS static site).
My setup:
- Frontend deployed on Railway
- Custom domain: itlearningbh.com
- DNS managed via Cloudflare
- CNAME records correctly pointing to Railway domain
- Both root and www domains are configured
However, I am facing issues:
- The domain sometimes returns "502 Bad Gateway"
- Sometimes I get "Application failed to respond"
- SSL certificate issues appear for www subdomain (ERR_CERT_COMMON_NAME_INVALID)
- I have already set Cloudflare DNS to "DNS only" (not proxied)
- My app runs a static server using
serveand listens on process.env.PORT
I have verified:
- DNS records are correct
- Railway deployment is active
- Application runs successfully on Railway default domain
But the custom domain is not stable and does not properly resolve.
Could you please help me verify the correct setup for:
- Custom domain configuration on Railway for a static frontend
- Proper handling of www + root domain
- SSL certificate provisioning for custom domain
Thank you.
4 Replies
4 hours ago
Re 502, as you see this only sometimes, do you have serverless enabled?
4 hours ago
And could you list the domain(s) affected?
4 hours ago
oops sorry
4 hours ago
Your service itself, is seemingly failing to respond?