Knowledge Base
MilesWeb / cPanel

What is a public_html Folder?

Approx. read time : 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

Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.

Trusted By Thousands of Clients & Big Businesses

We highly appreciate the kind and stellar feedback we receive from our customers. Delivering the best is our goal! MilesWeb is rated Excellent out of 5 based on reviews. Read more reviews.

Excellent
Based on reviews
2 hours ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
4 hours ago
Milesweb is superb Hosting pro...
Milesweb is superb Hosting provider ever, their Support team is amazing!!!...
Abhishek Singh
15 hours ago
Great support in great timing...
We need urgent assistance on changes in a primary domain on our client's Cpanel accounts and reached...
Riyaju Deen
21 hours ago
Best Website Hosting platform ...
I was new on MilesWeb. And needed help on multiple areas from setting up to getting started with cre...
Harshada
1 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
1 days ago
the team is very supportive th...
the team is very supportive though at times effort needs to be made to make understand the problem s...
Suree Sharma
1 days ago
I am using miles web for 3plus...
I am using miles web for 3plus years, very quick and perfect support by the team, they helped me man...
Sri Raghav
2 days ago
The service is good...
The service is good. They are answering with patience and doing the needful as soon as possible....
MR
2 days ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
3 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
4 days ago
positively helped me with find...
positively helped me with finding insecure content on my website causing SSL to not work properly on...
Thaviraj Junglee
4 days ago
Exceptional support, Truly Pra...
I had opted for the basic wordpress hosting plan as I intended to experiment with various plug-ins. ...
Aseem Chandna