an hour ago
I'm getting 404 when acessing domain url but it works when acessing railway ulr.
I moved for another region but still didn'n work.
3 Replies
Status changed to Open Railway • about 1 hour ago
an hour ago
The 404 on your custom domain while Railway URL works is almost always one of these — check in this order:
- DNS records wrong or incomplete
- You need a CNAME record pointing your domain → your-service.up.railway.app
- You also need the Railway TXT verification record (which the moderator mentioned). Without it, Railway won't fully activate routing for your domain.
- Run dig yourcustomdomain.com CNAME and dig yourcustomdomain.com TXT to confirm both are set correctly.
2 DNS hasn't propagated yet
- Even after adding the right records, propagation can take up to 48 hours depending on your registrar's TTL. Check current propagation at https://dnschecker.org
3 App returning 404, not Railway
- If Railway URL works on the root path but custom domain gives 404, check whether your app has any hostname-based routing that might reject unknown domains. Try hitting your domain with curl -v to see if you get an HTTP 404 (app-level) or a connection-level error.
4 Region change didn't carry over the domain config
- When you moved regions, verify the custom domain is still attached to the service in the new region under Settings → Networking. Sometimes region changes require re-adding the domain.
Share which step you're stuck on and we can narrow it down.
an hour ago
The 404 error on your custom domain usually means that while Railway's infrastructure is ready, the routing between your domain registrar and Railway hasn't been fully established or recognized yet.
Here is a step-by-step guide to fix this:
- Check Railway Dashboard Configuration:
Go to your Service settings -> Networking -> Custom Domains. Make sure your domain is spelled correctly and exactly matches the one you are trying to access.
- Verify DNS Records at Your Registrar:
Ensure that your DNS settings are properly configured.
- For a subdomain (e.g., www.yourdomain.com), point a CNAME record to the target URL provided by Railway (usually something like proxy.up.railway.app).
-
- For a root domain (e.g., yourdomain.com), use an ALIAS or ANAME record pointing to the Railway proxy, or configure the correct A records if required.
- SSL/TLS Propagation:
Since you mentioned changing regions or setups recently, DNS propagation and automated SSL generation (Let's Encrypt) can take anywhere from a few minutes up to 24 hours. If the DNS is correct, giving it a bit of time often resolves the 404.
- Clear Browser/DNS Cache:
Your browser or local network might be caching the old 404 state. Try accessing the custom domain via an Incognito window or clear your local DNS cache (ipconfig /flushdns).