In cPanel, to create subdomain outside public_html is possible only if our host allows for it.
As part of our cPanel-WHM support service, Bobcares responds to all inquiries, no matter how trivial.
Let’s examine in greater detail how our Support team creates a subdomain outside of public html.
How to create subdomain outside public_html in cPanel?
The default Document Root on cPanel servers when adding an Addon OR Subdomain is /home/user/public html/addon.com. What if we want the Document Root to be somewhere other than public html? When we add the Addon OR subdomain, we can. The system, however, forbids it. We need to get in touch with the web hosting company to enable this feature. Not every web host offers this function. We can have a document root anywhere in the home directory when the setting is disabled.
Step’s to create subdomain outside public_html in cPanel
If we have a dedicated server or VPS hosting, then
- Firstly, log in as root to WHM.
- Then, click on the Server Configuration from the menu.
- Then, go to Tweak Settings.
- Enter public_html in the Find textbox at this point.
- Restrict document roots to public_html is normally turned on. Change it to Off.
- It prevents users from creating subdomains outside of their public html directory when set to On.
- Finally, click on Save.
This will enable us to set the Addon Domain’s or Subdomain’s document root outside of public html.
[Looking for a solution to another query? We are just a click away.]
Conclusion
To sum up, the host must be contacted in order to create a subdomain outside of public html in cPanel. They must remove the restrictions in order for us to have a document root anywhere in the home directory.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments