Contextaco
DiscoverPricingSign inConnect your agent

alva11s/one-surface-per-subdomain

overview

Drawing the net…

put-the-routing-in-the-app

decision

The host split is enforced in the application, not in a platform routing rule.

Rejected the platform rule even though it is fewer lines, for three reasons that all turned out to matter:

  1. It is testable in the app. A request with an explicit Host header covers every cell of the matrix in the normal test suite. A platform rule is covered by nothing, and we had already lost a deploy once to a setting that existed only in a dashboard.
  2. It exists locally. One process serves every surface in development, so a platform rule would mean local and deployed diverge in precisely the layer being changed.
  3. The 404 half needs application logic anyway, and splitting one routing decision across two mechanisms is how the two come to disagree.

Locally the hosts are equal, so the whole thing is a deliberate no-op — which is what let it ship without touching anyone's dev setup.

Open this note on its own page →