Knowledge Base Hub

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

Home  >  cPanel  >  What is a public_html Folder?
Top Scroll

What is a public_html Folder?

 2 min

The web root for your primary domain name is called as the public_html folder.

The public_html folder comprises of all website files which you want to be displayed when someone types your main domain (the one provided while signing up for hosting).

Or in other words, when visitors type your domain name into their browser, whatever is in the public_html folder will get displayed to them.

Where To Find this Folder?

You can find the public_html folder inside your File Manager in your cPanel.

Examples

For example, if the file named as index.html is present in the public_html folder, it will get displayed when your website is browsed.

In case there isn’t a default file in the public_html folder (such as index.html, default.html, etc.), then a list of files in the public_html folder will be displayed.

Note: Ensure to replace example.com with the primary domain on your account ( the one that you had signed up with).

Addon Domains & Subdomains

It is possible to create Addon domains and Subdomains and these will be stored in the folder inside public_html.

Examples

Suppose you create an Addon domain named as addondomain.com. It will use a subfolder same as /public_html/addondomain.com/ (unless you specify any other).

Or if create a Subdomain named as milesweb.abc.com, it will use a folder same as /public_html/milesweb/ (unless you specify any other).

Suppose milesweb.abc.com is defined as a subdomain, and addondomain.com is defined as an addon domain, then the following examples are applicable:

Note: Ensure to replace abc.com with the primary domain on your account (the one you originally signed up with and haven’t changed it). Also, replace addondomain.com with the extra domain you added in the cPanel’s “addon domains” section.

In case you don’t want the additional domains to be subfolders of public_html, then reseller, VPS or dedicated hosting is a better solution, because you can insert each domain in its own cPanel to keep it independent from other domains. With shared hosting you only get one cPanel, and therefore, all addon domains are subfolders of the public_html folder.

Permissions

It is important that public_html folder has 0750 permissions.

Check if all files within the public_html folder have 0755 or 0644 permissions.

Note: If the complete path is actually /home/username/public_html/ (where username is your cPanel username) instead of /public_html/ but in maximum places you will see /public_html/ rather than the full path, because it assumes that you know you are in your own home directory.

Hope this article has helped you to learn about public_html folder.

Also Read

Learn to configure File Permissions in File Manager

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.