Cpanel supports both parked domains and addon domains, with the ability to easily remove a domain as one and re-add as the other. However, you may find this problematic if you have set up email addresses, filters, or mailing lists under a parked domain and want to make it into an addon domain.
While performing this action is not directly supported by cPanel at this time, there is a way to do this if you have root access to your server.
1) Create a subdomain
cPanel maps addon domains to subdomains of the main domain on the account. So go into cPanel and create a subdomain for the parked domain. For example, if your parked domain is mydomain.com, create:
2) Edit main userdata file
Go into /var/cpanel/userdata/$user/ and open up the main file in an editor. You should see something like this:
If you have existing addon domains, you’ll see them listed and can just add your domain to the list. Otherwise, alter the entry to look like this:
The “mydomain.mymaindomain.com” is the subdomain you created in step 1.
Remove the domain from the parked_domains section of this file, then save and close.
3) Edit the Virtualhost
In the same folder, open the config file for your main domain and remove the parked domain from the serveralias: line – including the www for the parked domain.
Open the file for the subdomain you created in step one, and add the parked domain to the serveralias: directive.
Make sure the mydomain.mymaindomain.com part is the same as the subdomain you created in step 1.
4) Update cPanel config
Run the following commands:
service httpd restart
If you go into cPanel now, the domain will be listed and treated as an addon domain, and you and upload the website’s files to the location you specified when you created its subdomain.