- Subdomain outside of public_html | cPanel
- Subdomain inside of public_html | cPanel
- How to move subdomain from public_html cpanel
- Pointing a sub-domain to folder outside public_html
- How to Set Document Root outside public_html for Addon Domain OR Sub Domain?
You have to WHM privilege to do the task.
- Log in to WHM.
- Click on “Server Configuration”.
- Then go to Tweak Settings.
- Now, click on the “Domain” tab.
- Go to “Restrict document roots to 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. You can have a document root anywhere in your homedir.