Krishopper

Registered
Feb 13, 2011
1
0
51
Hello,

Is it possible to adjust cPanel so that the main domain name goes into public_html/domain.com, and the DocumentRoot for that adjusts accordingly as well?

I do not want my users to be able to go to http://maindomain.com/alternatedomain.com to get to their alternate domains, I'd like each domain (including the main) to be in a separate directory.

Thanks
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,606
33
238
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello Krishopper,

Rather than having the main domain in public_html/maindomain.com you could instead have addon domains go to their own directory outside public_html by unchecking this option in WHM > Tweak Settings:

public_html subdomains only [?]

Prevent users from creating subdomains outside of their public_html directory.
When users aren't prevented from creating subdomains outside of public_html, they can then create addon domains such as /home/username/addon1.com, /home/username/addon2.com while the main domain would still be at /home/username/public_html location.

Of note, you cannot enforce this option for accounts with the setting, but you can allow the option, so users can do this if they want to do so.

Thanks.