Automatically creating a subdomain with CPanel, without logging into CPanel


Jun 13, 2005
South Africa
Good morning,

My hosting provider uses CPanel to help me manage my domain. They do not provide SSH or anything like that and I have to login to CPanel to create sub domains.

A client of mine wishes to create a new sub domain every time they create a new section on their website. We have developed a content management system for them which allow them to create the new section and add all the information for that section. This then sends me an email telling me to create the appropriate sub domain.

I want to automate this process. Basically when they create the new section I want to use a PHP script to tell CPanel to create the new sub domain and redirect it to the correct page.

For example: They create a new section called support which requires a sub domain like The actual page called is something like index.php?section=23. I now want to tell CPanel to create a sub domain called and redirect all requests to

I have done a bit of Googling, with possibly the wrong search terms, which didn't bring any clarity.

It will be much appreciated if you could provide me with some additional information and/or pointers on how to get this going.

Thanks in advance