Changing primary domain without touching e-mails

frdz

Registered
Sep 11, 2018
1
0
1
Poland
cPanel Access Level
Root Administrator
So my deal is:

I have a client with domain.com as the primary domain. He also has a few subdomains and e-mail accounts in this domain.com.

Now he wants to change his primary domain to OLD.domain.com, and add domain.com as subdomain(?), so he could have control (via cPanel) over the destination which is domain.com pointing to on the server (/public_html/whatever_he_likes/).

So my question is: how to change primary domain on the account from domain.com to old.domain.com (yes, the subdomain of domain.com), and not to change all other subdomains he already has (example.domain.com will become example.old.domain.com, which I want to avoid), and not to change domains of e-mails he already got ([email protected] will become [email protected] - also want to avoid).

OR maybe there is another solution for Client to have full control over the root directory of primary domain? (I've changed it manually for now via editing /var/cpanel/userdata/<username>/<domain>).
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hi @frdz

So my question is: how to change primary domain on the account from domain.com to old.domain.com (yes, the subdomain of domain.com), and not to change all other subdomains he already has (example.domain.com will become example.old.domain.com, which I want to avoid), and not to change domains of e-mails he already got ([email protected] will become [email protected] - also want to avoid).
There's no way to do this without creating a new account for the user and the manually restoring the data but I don't think the end goal would match what you'd like to do because of the document root directory change you're wanting to make.

OR maybe there is another solution for Client to have full control over the root directory of primary domain? (I've changed it manually for now via editing /var/cpanel/userdata/<username>/<domain>).
The way you're noting you've done this is currently the only way to customize the document root - there is no way to customize this that is supported by cPanel or available natively. There are some feature requests that are similar to what you're requesting and I would suggest logging in and voting on them if this is something you'd like to see in the product:

Main Domain to use a subfolder like addon domains
Improve Domain and Subdomain Directory Structure under public_html