a month ago
Hi,
We run a SaaS platform (Siterius) that builds websites for small businesses: each customer gets their own custom domain. We were hitting the Pro plan's limit of 20 custom domains per service, given our business model (one domain per customer).
We've since worked around this by routing customer domains through a Cloudflare Worker that forwards traffic to our Railway service's own domain (with the original customer domain passed via a custom header, since Railway appears to overwrite standard headers like X-Forwarded-Host with its own value). Railway now only ever sees its own domain, not the individual customer domains.
This works, but we wanted to flag it and ask:
-
Is this Worker-based approach a supported/recommended pattern for multi-tenant platforms like ours, or is there an alternative approach you'd suggest?
-
Is it possible to raise the 20 domains/service limit directly instead, so we don't need to rely on this workaround as we scale? If so, up to how many, and are there any additional costs involved?
Thanks in advance for your help.
1 Replies
a month ago
The Cloudflare Worker approach you've built, where customer domains are managed externally and proxied to a single Railway domain with the original host passed via a custom header, is the recommended architecture for multi-tenant platforms offering custom domains to end-users. The custom domains feature is not designed for that scaling pattern, so the per-service limit is not raised for it. If your customers can use subdomains of your own domain (e.g. *.siterius.com) rather than bringing their own, a single wildcard domain entry covers all of them with one certificate and no external proxy.
Status changed to Awaiting User Response Railway • about 1 month ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 1 month ago