2 months ago
Hi Railway team,
I am experiencing an issue where my custom domain justdocs.xyz consistently returns a 502 error, while my default Railway domain justdocs-nginx-production.up.railway.app works perfectly fine.
The problem: Every time I add justdocs.xyz as a custom domain to my justdocs-nginx service, Railway generates a new internal CNAME endpoint (most recently oauebqpm.up.railway.app). However, when I hit that endpoint directly, it returns:
Plain Text
{"status":"error","code":404,"message":"Application not found"}
This means the custom domain endpoint is not internally wired to my running service.
Current DNS configuration (all verified and propagated):
CNAME on
justdocs.xyz→oauebqpm.up.railway.app
TXT on
_railway-verify.justdocs.xyz→railway-verify=d46000df76fe8055b00e54fe560d4c7966cd95ca40bec3273a12f0375136d5ec
Railway dashboard shows green checkmarks on both records

SSL certificate successfully issued for
justdocs.xyz
What works:
https://justdocs-nginx-production.up.railway.app→ 200 OK
What does not work:
https://justdocs.xyz→ 502 "Application failed to respond"https://oauebqpm.up.railway.app(the generated endpoint ) → 404 "Application not found"
I have tried removing and re-adding the custom domain multiple times. Each attempt generates a new internal endpoint (7bey5rrf, yer22669, oauebqpm) and every single one returns "Application not found" when accessed directly.
The service is running on port 8080. Could you please investigate why the custom domain proxy endpoint is not being connected to my running service?
Thank you.
1 Replies
Status changed to Awaiting Railway Response Railway • 2 months ago
2 months ago
Hitting the random CNAME directly is expected to return a 404. That is not what that random CNAME is designed to be used for.
Please add your custom domain back, and then follow our docs for the 502 error.
https://docs.railway.com/networking/troubleshooting/application-failed-to-respond
Status changed to Awaiting User Response Railway • 2 months ago
2 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 2 months ago
