a month ago
I have a domain registered on Vercel (consensus.cash) which I am trying to redirect to a Railway deployment. After working with the agent, I redirect the Vercel nameservers to a brand new Cloudflare account, and followed its instructions to add CName records. But nevertheless, "consensus.cash" and "www.consensus.cash" both are stuck at the Railway 404 page. I have waited more than an hour to see if the DNS will update and all of that. I asked the agent I was working with to summarize below.
Summary of Configuration & Troubleshooting
Setup:
Service: Consensus.cash (ID: 7aa22d04-1731-4420-998f-024c265076f9)
Environment: production (fd6032c4-cfbc-47de-b087-f2920732cabf)
Project: giving-enthusiasm (1da38797-7553-487a-9477-daf2cea09583)
Domains: consensus.cash, www.consensus.cash
DNS: Migrated from Vercel to Cloudflare; CNAME records correctly point to consensuscash-production.up.railway.app
DNS resolution: ✅ Working (resolves to Cloudflare IPs 172.67.130.22, 104.21.7.96)
Railway-generated domain (consensuscash-production.up.railway.app): ✅ Working
Issue: Custom domains return the "train hasn't arrived at the station" error after 25+ minutes and multiple redeployments. SSL certificates are not provisioning.
Troubleshooting Performed:
✅ Verified Cloudflare DNS records are set to CNAME (DNS only, not proxied)
✅ Added consensus.cash and www.consensus.cash to service networking.serviceDomains with port 8080
✅ Triggered multiple manual deployments (deployment IDs: 4eeec64d-c0ea-439e-8093-fbd60394dec8, ea7296df-3ec9-4e88-b96d-b449c44cdd3e, 50b990e4-1c60-4524-a0f4-1cca2b87594d)
⚠️ Discovered: Custom domains keep disappearing from service config after deployments — only Railway-generated domains remain
✅ Re-added custom domains and redeployed (most recent deployment: 50b990e4-1c60-4524-a0f4-1cca2b87594d)
Current Status:
App is healthy and running on the Railway-generated domain
Custom domains are registered in config but SSL certificates are not provisioning
All DNS and Cloudflare settings are correct
Issue appears to be on Railway's certificate provisioning side
Assistance Provided: Railway Agent helped identify that the custom domains were being removed from the service config after deployments, which was preventing certificate provisioning. Re-added domains and triggered redeployment pending certificate provisioning.
2 Replies
a month ago
Your root domain is verified with a valid certificate on our side, but it is issuing a 301 redirect to the www subdomain, which is where the problem lies. The www subdomain's CNAME record either is missing or points to the wrong target. Each custom domain on Railway gets its own unique CNAME target, so both domains cannot point to the same .up.railway.app address. In your service's Settings under Networking, you will see a distinct CNAME target listed for each custom domain. Update the www CNAME in Cloudflare to match the target shown there (with the proxy toggled off/grey cloud), and add the TXT verification record shown in the domain settings so the certificate can provision. Once those propagate, the 404 on www should resolve.
Status changed to Awaiting User Response Railway • about 1 month ago
Railway
Your root domain is verified with a valid certificate on our side, but it is issuing a 301 redirect to the www subdomain, which is where the problem lies. The www subdomain's CNAME record either is missing or points to the wrong target. Each custom domain on Railway gets its own unique CNAME target, so both domains cannot point to the same `.up.railway.app` address. In your service's Settings under Networking, you will see a distinct CNAME target listed for each custom domain. Update the www CNAME in Cloudflare to match the target shown there (with the proxy toggled off/grey cloud), and add the TXT verification record shown in the domain settings so the certificate can provision. Once those propagate, the 404 on www should resolve.
a month ago
I was eventually able to fix this using the button that automatically connects Railway to Cloudflare and autopopulates the right CNAMEs. So I recommend that to anyone with a similar issue.
And I also had to turn off the DNS Proxy setting on Cloudflare CNAME records.
Status changed to Awaiting Railway Response Railway • about 1 month ago
Status changed to Solved Railway • about 1 month ago