Operating System & Version
CentOS 7.9
cPanel & WHM Version

Scott Greczkows

Well-Known Member
Feb 5, 2004
Hi there, I am moving a site from one server to another. I want to keep the other server online while I tweak our new server. I set the user's domain as what the domain will be, however I want to add a sub domain which points to the /public_html/ of the main account.

The server domain is mydomain.com
I want it to be temp.mydomain.com

I go into that accounts Cpanel,
Click on Domains
Click on Add
Enter the domain I want ie temp.mydomain.com
I want it to be able to use the domain root of /public_html/ however the Share Document Root option is greyed out.

Where do I change in WHM to allow this check box to be checked?

Last edited by a moderator:


Well-Known Member
Nov 20, 2014
cPanel Access Level
Root Administrator
Can I ask the reason for creating a sub domain.
If this is just for testing purposes may I suggest a simple solution.

Leave your old web site in situ, don't change anything, leave the DNS settings the way they are.
On your new server, create the account and domain as you would.

On your local computer, modify your hosts file.
Make your hosts file believe that the domain is on your new servers IP address.
For want of a better phrase, lets call this domain spoofing.

When your totally happy that the new server is behaving as you wish, you can make the appropriate DNS chnages and restore you hosts file.

And if none of what I said is relevent, ignore it, someone else will be along shortly :)


Jurassic Moderator
Staff member
Oct 19, 2014
cPanel Access Level
Root Administrator
cPanel doesn't let you create a subdomain that shares the same document root, so there isn't going to be a way to resolve that behavior you're seeing.

I would also recommend using the hosts file to test the sites. We have more details on using this method here:

That will allow you to confirm things are working well before you make any DNS changes.