Set up a wildcard A record to point to the server and the same in nginx/apache. Then use sub domain routing https://laravel.com/docs/9.x/routing#route-group-subdomain-routing
Nov 2, 2022
1
Level 1
Create subdomain in Laravel for users profile
Hi community, I'm looking to give a subdomain to each user so that each user can view their profile on it.
I have the app hosted on a digitalocean app server with the domain "app.mydomain.com". I want the URL for the users to be "user.mydomain.com".
My domain "mydomain.com" is on another server (VPS) which points to the domain and a CNAME for "app.mydomain.com".
Is it possible to do this?
I am willing to change the server and domain structure if necessary.
Thanks
Please or to participate in this conversation.