shaifshahin

Member
Sep 24, 2012
5
0
1
cPanel Access Level
Reseller Owner
I want to change primary domain, this domain has some subdomain also on same server. if i change it, any problem happens on its subdomai?

Also i want change primary domain document root path without any changing of its subdomain root path, how to do that
 

MilesWeb

Well-Known Member
PartnerNOC
May 23, 2012
173
2
68
India
cPanel Access Level
Root Administrator
Twitter
If you will change the main domain on the server, sub domains will be affected as well. If you change maindomain.com to newdomain.com, the sub domain will be changed to abc.newdomain.com from abc.maindomain.com.

Yes, you can change the DocumentRoot in apache config.
 

MosherCharles

Registered
Sep 26, 2012
2
0
1
cPanel Access Level
Website Owner
HI ! if you want to change your primary domain then you simply do this steps :

(1) The first step is to create a Full Account Backup in the cPanel.

(2) Login into the cPanel and open the File Manager (or use FTP) and create a folder in the /public_html that is called primarydomain.com.

(3) Move all the files for the primarydomain.com website from the /public_html folder to the folder at public_html/primarydomain.com.

(4)Once you have moved all the files for primarydomain.com from /public_html to the public_html/primarydomain.com folder you would then want to move or upload newdomain.com.

(i) If you had previously added newdomain.com as an addon domain, you would then want to move all the files from /public_html/newdomain.com to be in the /public_html directory.Then go to Addon Domains and remove newdomain.com.

(ii)If newdomain.com was not previously uploaded as an addon domain, then upload the files for newdomain.com into the /public_html folder instead. If you have a lot of files, FTP would be the best way to do this.

(5) Then you can go through with the domain change using the directions below.

(6) Re-add the primarydomain.com as an addon domain (if you still intend to use it).
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
What path are you wanting for the primary domain rather than /home/username/public_html? Please let us know specifically.