Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Web Host Manager  >  How to Set Document Root outside public_html for Addon Domain OR Sub Domain?
Top Scroll

How to Set Document Root outside public_html for Addon Domain OR Sub Domain?

 2 min

When adding an Addon OR Subdomain, the default DocumentRoot on cPanel servers is /home/user/public_html/addon.com. What if you want to set the DocumentRoot outside public_html? You can when adding the Addon OR subdomain. But, the system won’t allow it. To enable this feature, you need to contact your web hosting provider. Not all web hosts provide this feature. If you have a VPS hosting OR dedicated server, then

  • Log in to WHM as root.
  • Click on Server Configuration.
  • Go to Tweak Settings.
  • Now, in the Find textbox type public_html.
  • By default Restrict document roots to public_html option is On. Set it to Off.
  • When set to On it prevents users from creating subdomains outside of their public_html directory.
  • Click on Save.

This will allow you to set document root outside public_html for the Addon Domain or Subdomain.

This feature is available with our cPanel shared hosting plans.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.