What is a Document Root folder?

The document root is the folder where you keep website files for a domain name. Since cPanel allows for multiple domain names (Addon domains), then you need to have a unique folder for each domain.

Your primary domain is rooted in the public_html folder.

Your addon and subdomain names will be rooted to their own folders inside public_html.

After you create an Addon domain (or subdomain), you can find the Document Root inside cPanel.

Tip: You can click the Document Root name in cPanel to go to the correct folder in the File Manager.

Article Comments

Luke S
Can an addon domain document root folder be placed in another folder other then the /public_html folder? for example /public_html_NewAddonDomain.com?

Yes, absolutely. It can be any folder outside of public_html which you create.

Many advanced users do exactly that to make it impossible to view addon domains as http://primarydomain.com/addondomain/

Once an addon domain has been created inside the /public_html folder, can it be safely moved outside it? It's a working domain.

Sure, you just have to manually move the folder, and then remove and recreate the addon domain.

Hello! I'd like to remove direct access to root directories via web browser, but keep access to linked items within a given directory intact (e.g., a user can't look at "/root" but can view "/root/image.jpg"). I've tried looking this up elsewhere but must not be using good search terms. Thanks in advance for your help.

You have two basic options.

1. Turn off directory indexing. You can do this in cPanel, under the Advanced section. Just click the Index Manager icon, click Go, click "public_html", select "No Indexing" and click Save.


2. Create a blank "index.html" file and put it in each directory.

Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment