2 months ago
Custom apex domain (educorite.com) verified and green-checked in Railway, but requests still route to a different service in the same project.
Setup:
- Project: natural-energy (production environment)
- Domain: educorite.com (root/apex, no subdomain)
- Attached to: @educorite/web service (Next.js)
- Status in dashboard: verified, green checkmark, "DNS records" confirmed
- CNAME target: psabzdzh.up.railway.app (confirmed correct, matches DNS)
- TXT verification record: correctly set and matched
Problem:
Visiting https://educorite.com returns a 404 JSON response that is clearly coming from our @educorite/api service (NestJS NotFoundException "Cannot GET /"), not from the web service. It's been over 1.5 hours since the domain was verified — well past normal DNS propagation for a record-level change.
Other domains in the same project route correctly:
- api.educorite.com → @educorite/api service ✅ works
- (formerly app.educorite.com → @educorite/web ✅ worked before we consolidated to root domain due to hitting our custom domain plan limit)
Troubleshooting already done:
- Confirmed no conflicting A record for @ in Cloudflare DNS
- Confirmed nameservers correctly pointed to Cloudflare
- Confirmed via whatsmydns.net that NS + CNAME records have propagated globally
- Purged Cloudflare cache fully
- Tested from multiple browsers, incognito, and via server-side fetch (not a client cache issue)
- Deleted and re-added the custom domain in Railway (which generated the new psabzdzh target above) — still same 404 from wrong service after re-verification
This appears to be an apex/root-domain-specific routing issue on Railway's edge network, since subdomains on the same project route correctly. Would appreciate help checking the edge routing table for this domain.
3 Replies
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 2 months ago
2 months ago
I'd try removing all associated DNS records and domains and add it back after ~10-15 mins. Also make sure it's added to the correct service.
2 months ago
The domain has been removed from both services and re-added exclusively to @educorite/web. DNS and TXT verification are valid, and the web service's Railway domain works correctly. However, https://educorite.com still returns the NestJS Cannot GET / response from @educorite/api, while api.educorite.com correctly routes to the API. This indicates the apex hostname is reaching Railway but appears to be resolving to the wrong service at the Railway edge. Please inspect the internal custom-domain/edge routing association for educorite.com.
0x5b62656e5d
I'd try removing all associated DNS records and domains and add it back after ~10-15 mins. Also make sure it's added to the correct service.
2 months ago
The domain has been removed from both services and re-added exclusively to @educorite/web. DNS and TXT verification are valid, and the web service's Railway domain works correctly. However, https://educorite.com still returns the NestJS Cannot GET / response from @educorite/api, while api.educorite.com correctly routes to the API. This indicates the apex hostname is reaching Railway but appears to be resolving to the wrong service at the Railway edge. Please inspect the internal custom-domain/edge routing association for educorite.com.