a month ago
Hi Railway team,
I'm experiencing a persistent 502 error on a custom domain that I deleted and re-added to a service.
Details:
- Project: Citas
- Service: Citas-Frontend-QA
- Custom domain:
www.consiguetucita.es - Error: HTTP 502 with
x-railway-fallback: true - Request ID:
o9dVyglVSxeSftt-2JZdWA
What happened:
The domain was originally working (green checkmark, verified). I deleted it and re-added it to try to fix a routing issue. After re-adding, the DNS verification succeeded (green checkmark again in the dashboard), but the domain still returns 502.
Current state:
- DNS is correctly propagated:
www.consiguetucita.es→ugyjgl4g.up.railway.app(CNAME resolves correctly) - TXT verification record is present
- The Railway-generated URL (
citas-frontend-qa.up.railway.app) works perfectly - Only the custom domain returns 502
It seems like Railway's CDN/Fastly routing config hasn't been updated internally after the domain was re-added. Could you force a re-provisioning of the domain routing for this service?
Thank you.
Pinned Solution
a month ago
I assume now the port of your custom domain is the same port as Railway's generated domain?
5 Replies
Status changed to Open Railway • 30 days ago
a month 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.
a month ago
Thanks for the suggestion. I changed the port mapping for the custom domain from 443 to 3000 (which is the port Next.js listens on), but the issue persists.
Still getting HTTP 502 with x-railway-fallback: true.
New Request ID: AVYdajo_Sd-c2N83EuroCg
The Railway-generated URL (citas-frontend-qa.up.railway.app) works perfectly — only the custom domain fails. It seems like Fastly's routing config for www.consiguetucita.es is not properly mapped to the service internally. Could you force a CDN config refresh on your end?
a month ago
I assume now the port of your custom domain is the same port as Railway's generated domain?
0x5b62656e5d
I assume now the port of your custom domain is the same port as Railway's generated domain?
a month ago
The Railway-generated domain has no port configured (Railway auto-detects it). The custom domain had port 3000 set — I've now cleared it to match (but Railway force me to select 8080). Could you check if this resolves the routing issue on your end?
a month ago
I'm able to access your site now. Could've just been a caching issue.
Attachments
Status changed to Solved 0x5b62656e5d • 29 days ago
