Converting a packed domain to an addon domain

nino

Member
Mar 21, 2005
16
0
151
Hi,

I'm sorry to start another thread on this topic. I've seen others, but I didn't want to resurrect posts from so many years ago.

I have an account with a parked domain, it has emails accounts and a huge mailing list configured under it. The owner of this account is now requesting me to convert this parked domain to an addon domain.

Could anyone give me the steps for making this transition/conversion in the least traumatic way?

My cPanel is "WHM 11.42.1 (build 12)" on a Linux RedHat 6.5 x64.

Thanks,
Nino
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
Virginia Beach, VA
cPanel Access Level
DataCenter Provider
The process is a little lengthy, but here it is:

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:

mydomain.maindomain.com

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:

addon_domains: {}

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:

Code:
    addon_domains:
      mydomain.com: mydomain.mymaindomain.com
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:

Code:
/scripts/updateuserdomains
/scripts/rebuildhttpdconf
service httpd restart
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
You may want to submit a feature request for the ability to complete this through cPanel/WHM if you find it would be useful:

Submit A Feature Request

In the meantime, you could try using the instructions from the previous post. I suggest backing up the account beforehand in-case any issues arise.

Thank you.