How to set up wildcard subdomains for preview deploys
mcky
PROOP

a month ago

I was hoping to be able to forward railway's preview environment urls to a wildcard subdomain, so that

web-myapp-pr-xx.mydomain.com → web-myapp-pr-xx.up.railway.app

and still maintain some manual records like

app.mydomain.com → web-production-a20f.up.railway.app

Is this possible out the box (without e.g. deploying a reverse proxy)?

From reading the custom domains docs I get the impression the support for wildcard domains is more suited for multi-tenancy (e.g. my own services would differentiate tenant-a.app.com vs tenant-b.app.com)

Solved

5 Replies

Railway
BOT

a month ago

Our wildcard domain feature routes all matching subdomains to a single service, so it does not support dynamically forwarding different subdomain patterns (like web-myapp-pr-xx.mydomain.com) to different .up.railway.app targets based on the subdomain name. You're correct that it's designed for multi-tenancy where one service handles all wildcard traffic. To achieve the PR preview subdomain routing you described, you would need a reverse proxy or to add individual custom domains per PR environment, which could be automated via our public API.


Status changed to Awaiting User Response Railway about 1 month ago


mcky
PROOP

a month ago

Is this a feature railway would consider supporting in future without custom automations?


Status changed to Awaiting Railway Response Railway about 1 month ago


a month ago

That sounds like a feature request! Can you write up a detailed explanation of your use case and the feature? This way other users can upvote your issue and glob onto it.

You can write your feature request and view the roadmap here ---> https://station.railway.com/roadmap


Status changed to Awaiting User Response Railway about 1 month ago



Status changed to Awaiting Railway Response Railway about 1 month ago


a month ago

Thanks for creating the feature request! Others can upvote it there to help prioritize it.


Status changed to Awaiting User Response Railway about 1 month ago


Status changed to Solved brody about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...