Custom domains show ACTIVE with valid certs but the edge returns "Application not found", only the apex routes
stevewithtorrch
PROOP

2 hours ago

We're on the Pro plan and hitting a custom-domain routing problem in one of our environments. Custom domains attached to services in our staging environment are not being routed to the service, even though each domain shows syncStatus ACTIVE and certificateStatus VALID, DNS is correct and propagated, and we're well under the Pro plan's 20 custom-domain allowance. Requests return your edge fallback: HTTP 404 with body {"status":"error","code":404,"message":"Application not found"} and the header x-railway-fallback: true. TLS terminates correctly (the right per-domain certificate is served via SNI, curl reports ssl_verify_result=0) — only the layer-7 route to the service is missing.

The striking part: only one custom domain in the entire environment actually routes — the base-web service's apex. Every other custom domain returns the fallback, including one that is on the exact same edge as the working apex. Both services' railway-provided up.railway.app domains route fine.

Account / environment details:

Plan: Pro

Project: torchable-base, id 1af84445-8abb-4fcf-9c6d-340acf0aeb53

Environment: staging, id 16072d73-9267-485d-939e-9f120496bdf5 (this environment was created using "Duplicate" from our production environment)

Service: base-web, id 8e7d2124-817b-490c-99ae-8f33b2da586d, latest deployment 9322f501-3559-4b16-bc86-f11c2ecdd60b (SUCCESS), targetPort 8080

staging.base.torchable.com (apex custom domain): WORKS, returns 200 from the app. request-id _74VUrgaSkqdmi6vg4a9AQ, edge mia1

torchable-base-staging.up.railway.app (provided domain): WORKS, returns 200 from the app. request-id 1x4wE7daRE6tUWRng4a9AQ

acme.staging.base.torchable.com (custom domain id a4f1295f-696c-4cd6-a40e-8e9d983d119b): FAILS, 404 fallback. request-id jYjo50LPQIqTB9s6qmzx2A, edge mia1. Note this domain shares the same edgeId (edge-500b32d4e9aaa4d3ff91d6ebb54285cd) as the working apex, and both were served by edge mia1 in these tests — same edge, one routes and one does not.

*.staging.base.torchable.com (wildcard custom domain id 30fb1472-b845-43af-94f2-02e56e6f3691): FAILS, 404 fallback.

Service: connect-web, id c962a3cf-01e8-46a4-aa06-5b2c96b0c152

staging.connect.torchable.com (apex custom domain): FAILS, 404 fallback. request-id 6rFelH2nRlqZmyfNozsQ6Q, edge mia1

torchable-connect-web-production-staging.up.railway.app (provided domain): WORKS, returns 307 from the app.

For every failing custom domain, the GraphQL domains query reports: certificateStatus VALID, certificateStatusDetailed COMPLETE, certificateErrorMessage null, syncStatus ACTIVE, and DNS records DNS_RECORD_STATUS_PROPAGATED (a CNAME pointing at the per-domain up.railway.app target, set to DNS-only / not proxied in Cloudflare).

Things we have already tried, none of which fixed the failing domains:

Re-issuing the certificate (customDomainIssueCertificate): succeeds, the cert goes VALID, but the domain still returns the 404 fallback.

Deleting and re-creating the custom domain, for both the wildcard and a specific host: we get new targets and a valid cert, but it still returns the 404 fallback.

Triggering a full service redeploy/rebuild after the domains were added: still the 404 fallback.

Verified that DNS resolves to the Railway edge and the correct certificate is served (curl ssl_verify_result=0).

It looks like the custom-domain-to-service route is not being propagated to the edge router for this duplicated staging environment, with the sole exception of the base-web apex. Could you please investigate why these ACTIVE domains with valid certificates are not being routed, and re-sync the edge routing for these services?

$20 Bounty

2 Replies

Railway
BOT

2 hours 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 about 2 hours ago


You need a TXT record on _railway-verify.staging.base.torchable.com. You can find the content for it from the verificationToken property under status.


stevewithtorrch
PROOP

an hour ago

That works, thank you!


Welcome!

Sign in to your Railway account to join the conversation.

Loading...