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

krishna9720's avatar

Laravel Interesting Module - Dynamic subdomain routing with Digital Ocean server

Hi,

I have to build an online store in laravel. Assume with URL "website.com".

Now, I have to create stores as a user all "shopowner" as a user here to manage their shops.

And the Interesting constraint is when I am registering a "shopowner user" then automatically that will be created like as a subdomain on the root website.

Assume I registered a user with "shop1" then it will create a subdomain automatically like "shop1.website.com" and all the users will be accessing that store at this particular url.

I did some R&D and found that it's possible with "laravel subdomain routing".

But I really don't know how to do that. What operations and setting I have to do with my digital ocean server?

Can anyone please guide me how I can build that?

I will be thankful to you experts.

Thanks

0 likes
0 replies

Please or to participate in this conversation.