HoganHost blog

[email protected]

How to create subdomain outside public_html in cPanel? Easy Steps

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, HOGANHOST 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

  1. Firstly, log in as root to WHM.
  2. Then, click on the Server Configuration from the menu.
  3. Then, go to Tweak Settings.cpanel create subdomain outside public_html
  4. Enter public_html in the Find textbox at this point.
  5. Restrict document roots to public_html is normally turned on. Change it to Off.
  6. It prevents users from creating subdomains outside of their public html directory when set to On.
  7. Finally, click on Save.

This will enable us to set the Addon Domain’s or Subdomain’s document root outside of public html.

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.

Check out our cheap and reliable web hosting hoganhost.com.ng

Leave a Comment

Your email address will not be published. Required fields are marked *