Skip to content
Public domain returns 404, application returns 200
emilabdurahmang-collab
OP

a month ago

Subject: Public domain returns 404 from external browsers, but 200 from inside container

Hello Railway Support,

Our Node.js application is deployed successfully and is active.

Project: "faydly-platform"

Service: "faydly-web"

Domain: "https://faydly-market.up.railway.app"

Port: "3000"

The application returns HTTP 200 for "/" and "/health" when accessed locally inside the container.

Requests to the public HTTPS domain from inside the container also return HTTP 200, with the expected content.

However, external browser requests to the same domain consistently return HTTP 404. Railway Network Logs confirm these 404 responses.

We have verified the start command, PORT environment variable, public domain configuration, and Edge settings.

Could you please investigate why external requests are receiving 404 while requests from inside the container succeed?

Thank you.

$10 Bounty

5 Replies

Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 1 month ago


a month ago

Works fine for me, Try force refresh the site

image.png


mayori

Works fine for me, Try force refresh the site ![image.png](https://station-server.railway.com/attachments/att_01m56sacwve8gbkkc9pf92p2r4)

emilabdurahmang-collab
OP

a month ago

Additional findings from Railway HTTP logs:

The same hostname "faydly-market.up.railway.app", same path "/", and same active deployment return HTTP 200 for some external clients, but HTTP 404 for others.

Examples (UTC):

  • 06:07:02 — GET / — 200
  • 06:10:28 — GET / — 200
  • 06:28:14 — GET / — 404
  • 06:33:34 — GET / — 404

The domain is Railway-managed and targets port 3000. The Node.js application serves "/" successfully from inside the container.

Could you investigate why the same public domain routes differently for different external clients or network paths?


mxiand

a month ago

Your follow-up is useful: a fresh 404 recorded in Railway HTTP logs needs to be correlated with the successful requests, rather than attributed to browser cache alone.

I made two unauthenticated HTTPS GETs at approximately 2026-10-18 13:53 UTC, without changing your service:

  • GET /: 200, x-railway-edge: lax1, x-railway-request-id: GY7in5zDTIWtv6XkY53eZw, Cache-Control: no-store.
  • GET /health: 200, x-railway-edge: lax1, x-railway-request-id: JNjnCTJJRSWCKBMT-_9nXA.

This confirms one currently working network path, not that every client is working or that the earlier failure is resolved. I have not reproduced the 404.

The next useful comparison is a failing request made now and a successful request made close to it. On an affected machine, use a fresh private browser window and also make a normal unauthenticated request to the same exact URL outside the browser:

curl -sS -D response-headers.txt -o response-body.html https://faydly-market.up.railway.app/

Keep the status, UTC time, request ID, edge header and a redacted description of the response body. Do not post cookies, authorization headers or an unredacted browser archive.

In Railway HTTP logs, filter by each request ID using @requestId:THE_ID. Compare host, path, status and edge region; the official log reference documents these filters: https://docs.railway.com/observability/logs#http-logs . Correlate those requests with existing application logs, if available. An absent app log alone is not proof of an edge failure unless the application logs every request.

If only the browser fails, inspect its service-worker/cache behavior. If fresh browser and curl requests both fail, give Railway support the matched failing/successful request IDs so they can inspect the route internally. A different edge region is a clue, not proof of a broken edge. Avoid recreating the domain or service just to test a hypothesis.

AI-assisted answer. The two GET results above are actual observations; the remaining steps are a diagnostic plan. I have not accessed your project or repaired its routing.


sundayabasi684-byte
Top 10% Contributor

a month ago

Hi @emilabdurahmang-collab,

Since the issue happens intermittently across external clients (with some getting 200 and others receiving 404 on the exact same deployment), this usually points to host binding or edge routing propagation. Here is a step-by-step set of checks to resolve it:

Step 1: Explicit Server Host Binding

Ensure your Node.js/Express server is listening on 0.0.0.0 rather than localhost or 127.0.0.1:

const PORT = process.env.PORT || 3000;
app.listen(PORT, '0.0.0.0', () => {
  console.log(`Server running on port ${PORT}`);
});

Step 2. Verify Networking Target Port

In Railway Dashboard -> faydly-web > Settings > Public Networking, double-check that the Target Port is manually assigned to 3000 (matching your app's listening port) rather than relying on automatic detection.

Step 3. Trust Proxy Setting

If you are running Express, enable app.set('trust proxy', true); so header attributes (X-Forwarded-Host / X-Forwarded-Proto) passed by Railway's ingress proxies are handled correctly.

Step 4. Resync the Route

If settings look correct, try briefly removing and re-attaching the domain (faydly-market.up.railway.app) under Public Networking settings to force a route refresh across all edge PoPs.

ishusinghse

a month ago

We’re interested in investigating the difference between internal and public routing. Is this bounty still open, and can you share the redacted service configuration and exact reproduction steps?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...