7 days ago
Railway support ticket — custom domain stuck at edge fallback 404 (cert VALID, syncStatus ACTIVE)
Project: webgen (id 2cbee5f5-05b7-41fd-9aa9-b0cc1a9cae35), env production
Service: webgen-web (id 4c799d10-4828-4c74-933b-eb0598d7f9d9) — a Next.js app, listens on port 8080
Custom domain: webgen.emiko.io
Summary
A custom domain will not route to its service. Railway's control plane reports the
domain healthy — syncStatus: ACTIVE, certificateStatus: VALID, correct
serviceId/environmentId, targetPort: 8080 — and the TLS cert is correctly issued
for webgen.emiko.io (Let's Encrypt). But every request to https://webgen.emiko.io
returns a Railway edge fallback 404:
HTTP/2 404
server: railway-hikari
x-railway-fallback: true
x-railway-edge: waw1
{"status":"error","code":404,"message":"Application not found"}The service is healthy and its railway.app domain works perfectly:
https://webgen-web-production.up.railway.app/ → HTTP 200.
What we've verified / ruled out
-
DNS: CNAME
webgen.emiko.io → <target>.up.railway.app, propagated on both authoritativenameservers and public resolvers; Railway API shows
currentValue == requiredValue,DNS_RECORD_STATUS_PROPAGATED. -
Cert:
customDomainIssueCertificate→CERTIFICATE_STATUS_TYPE_VALID; edge presentsa valid
CN=webgen.emiko.ioLet's Encrypt cert. -
targetPort: explicitly set to 8080 (the app's listening port) at domain creation.
-
Service binding: correct serviceId + environmentId per the API.
-
Tried: redeploying the service; deleting and recreating the custom domain from
scratch (twice — got fresh targets and fresh edge nodes each time: 69.46.46.42,
then 69.46.46.30). The fallback 404 persists across both edges.
-
No CAA records, no DNSSEC, port 80 reaches the edge (HTTP 301 → https).
-
The DNS record's
currentValuereported by your API is unstable: it flapsbetween the correct
requiredValue(e8fy5h7k.up.railway.app) and the target of aPREVIOUSLY DELETED registration (9j5lwtix.up.railway.app) on repeated polls —
suggesting a stale/inconsistent internal DNS cache.
-
Critically: even at the moments when
currentValue == requiredValue(status PROPAGATED, cert VALID, syncStatus ACTIVE), the edge STILL returns the
fallback 404. So DNS-match is not the gating factor — the route simply never
reaches the edge.
-
customDomainUpdate(re-set targetPort) andcustomDomainIssueCertificatebothreturn success and do not change the outcome.
Ask
The edge is not picking up the route for this custom domain despite the control plane
reporting it ACTIVE/VALID. Please flush/re-sync the edge routing for
webgen.emiko.io on service webgen-web, or advise what's preventing the route from
propagating to the edge.
We've reverted DNS to our previous host to keep the site up in the meantime, and will
re-point to Railway once the edge routing is fixed.
Pinned Solution
7 days ago
You need to add a TXT record for _railway-verify.webgen.emiko.io. If you are using the API to add your custom domain, you can find it in verificationToken under status.
2 Replies
7 days ago
This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.
Status changed to Open Railway • 7 days ago
7 days ago
You need to add a TXT record for _railway-verify.webgen.emiko.io. If you are using the API to add your custom domain, you can find it in verificationToken under status.
6 days ago
Yes, it worked! Adding that TXT record verified correctly!
Thank you so much!
Status changed to Open 0x5b62656e5d • 5 days ago
Status changed to Solved 0x5b62656e5d • 5 days ago