Your users should be able to configure a CNAME record for their domain that points to your domain, for example
userdomain.com. CNAME user.application.com.
and then tell your application that they want to use userdomain.com as their host name. I do not think that you will have to change your vhost settings because your server will see a request for user.application.com , but check this by setting your own CNAME to be sure.
In your application, you will need to look at the host name, and if it contains application.com , you will do the same as now, but if it does not check you, is there a user who has set this domain as his own.
source share