Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tkmitpl's avatar

Anyone have experience with subdomain based tenancy

Hi Fam!

I'm trying to build an application where I want to have a subdomain for every tenant on my system. Anyone can sign up and should be redirected to their unique subdomain.

The most important question I have is how should I setup my local machine to support subdomains. I know that I can manually add entries into my /etc/hosts file. But how do I test if this process is dynamic?

An extra credit question is do any of you have any recommendations for how to host it in production? Any service that you've used to achieve something like this?

Thanks in advance and I'm looking forward to your insights!

0 likes
1 reply

Please or to participate in this conversation.