How To Create An Addon Domain using the API?

clickwhale

Registered
Apr 25, 2016
1
0
51
Mumbai
cPanel Access Level
Root Administrator
Hi,

We are creating an in-house software that needs to use the Cpanel api to create addon domains on our own server.

Yes we have root access.

The current UAPI does not seem to have an equivalent function.

Using the cpanel api2 shows that it's deprecated (meaning removed soon?)

So is this very important function no longer available now?

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463

cPanelKeithS

Active Member
Staff member
Oct 14, 2008
33
2
133
On the backend, an add-on domain is technically a subdomain of the main cpanel user's domain with another domain parked on top of it.

First, Create the subdomain - sub.cpanelusersdomain.com

Then, Create an Alias (park) pointing to the subdomain - parkedontopofsub.com

The add-on domain's http files can be uploaded to the subdomain's directory - /home/cpaneluser/www/sub.cpanelusersdomain.com
 
  • Like
Reactions: cPRex