Wildcard *.fleetdata.pro active but demo.fleetdata.pro not routed to backend (empty edge 404)
valeriuv
PROOP

a month ago

Hi!

My Django backend service has custom domain *.fleetdata.pro (active). DNS is on Cloudflare; all tenant subdomains resolve identically:

demo / hermes / tva / public / zzztest999

→ *.fleetdata.pro

→ ujs9yjp6.up.railway.app

→ 69.46.46.66

The problem is that Railway's edge only routes some hostnames to our Django app, even when they hit the same edge IP.

What works:

hermes.fleetdata.pro — GET / returns 302 to login; POST /api/token/pair returns 401 JSON. Request reaches Django (we see x-frame-options: DENY).

tva.fleetdata.pro — same as hermes.

public.fleetdata.pro — GET / returns a Django HTML 404 page; POST /api/companies/resolve-tenant/ returns 200 JSON. Request reaches Django.

What does not work:

demo.fleetdata.pro — GET / returns 404 with an empty body (0 bytes). POST /api/token/pair also returns 404 with an empty body. No Django headers (x-frame-options is missing). Only Railway edge headers are present (server: railway-hikari, x-railway-edge, x-hikari-trace).

zzztest999.fleetdata.pro (random, never registered) — same empty edge 404 as demo.

Same DNS, same edge, different result per hostname — so Railway's edge is accepting the connection but not forwarding "demo" to my app.

We can reproduce it by sending requests to the same IP and only changing the Host header:

IP=69.46.46.66

curl -sI --resolve demo.fleetdata.pro:443:$IP https://demo.fleetdata.pro/

-> 404, empty body, no Django response

curl -sI --resolve hermes.fleetdata.pro:443:$IP https://hermes.fleetdata.pro/

#-> 302 to /accounts/login/, Django response

Why does *.fleetdata.pro not route all subdomains (e.g. demo, random hosts), while hermes, tva, and public work on the same edge IP? What is the correct way to register new tenant subdomains so they route reliably?

Note: I might have had individual tenant subdomains on railway backend at some point in the past before the wildcard domain.

Awaiting Conductor Response$20 Bounty

1 Replies

Railway
BOT

a month 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 1 month ago


valeriuv
PROOP

a month ago

Thanks, masteraiwork10-cyber — your diagnosis matched what I noticed. The *.fleetdata.pro wildcard on my Django Backend is verified (CNAME + _acme-challenge + _railway-verify TXT in Cloudflare) but does not route new subdomains. hermes/tva/public reach Django; demo and random hosts (zzztest999) got empty edge 404s on the same IP until explicitly registered.

Option 1: I had no individual subdomain entries visible in Railway Networking — only the wildcard. So there was nothing to delete. hermes/tva/public still routed (likely grandfathered).

Option 2: This worked. I registered demo.fleetdata.pro explicitly on the backend with CNAME + _railway-verify.demo TXT in Cloudflare. After Railway showed Active, demo returned 302 + Django 401 JSON on /api/token/pair.

It's still unclear why a fully verified *.fleetdata.pro wildcard does NOT route all subdomains, requiring explicit per-host registration for each new tenant?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...