Can I make a cpanel virtual server accept any domain pointed at it without actively defining that domain?

adam-panel

Registered
Aug 3, 2020
2
0
1
London
cPanel Access Level
Website Owner
I've thought of a site I would like to develop... each user account of this service will have their own page where their content is shown. Ie : www.mynewdotcomidea.com/theusersname

However as an extra optional I would like to offer that they can point their own domain at my VPS and totally hide the fact of who/what is hosting this page.

Naturally this is easily accomplished if one goes into a cpanel and sets up alias domain names etc.

However i'm thinking at scale and want to be able to do this without having to actively go into cpanel myself and define each new domain every time a user opts in to this service.

So in otherwords, the server needs to just accept whatever domains point to it and then the rest would be handled in my code.

Is this possible with the standard permissions I'm granded as the owner of a VPS account hosted by an ISP ?


Thanks for your time
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,252
313
Houston
I believe the most common way to do this is with a wildcard subdomain but you wouldn't obfuscate the root domain. It would be *.yourdomain.tld.

If you wanted to have some form of opt-in for a service that would create them an alias domain on domain.com/usersdomain you could create something custom that would do this using the API function here: cPanel API 2 Functions - Park::park - Developer Documentation - cPanel Documentation
 

adam-panel

Registered
Aug 3, 2020
2
0
1
London
cPanel Access Level
Website Owner
@cPanelLauren, thanks for the response but to clarify, it wouldn't be a subdomain I want this to work on but complete domains.

This API functionality you reference, is that available to standard customers of an ISP or only something the ISP themselves normally have access to ?