What is a public_html folder?
The main directories for your domain name are referred to as public_html folders.
The public_html folder is your main domain and is the website file and all website files are uploaded to this folder.
If users access your domain name through the internet browser. Hence, the website files are located in the public_html directory.
Where To Find this Folder?
Go to your cPanel as you will find the public_html folder under your file manager.
Examples
If there is a file in the public_html folder named index.html, this file will show when accessing the website.
If not, then you will just see a list of all of the files present in the public_html folder.
Note: Default primary domain entered during signup is example.com.
Addon Domains and Subdomains
Subdomains and Addon domains can be created, and they will be kept in a separate folder under public_html.
Suppose you create an Addon domain named addondomain.com. It will use a subfolder the same as /public_html/addondomain.com/ (unless you specify any other).
Or if you create a Subdomain named milesweb.abc.com, it will use a folder the same as /public_html/milesweb/ (unless you specify any other).
Suppose cantech.abc.com is defined as subdomain, and addondomain.com is defined as an addon domain, then the following examples are applicable:
Note: Make sure to replace abc.com with the primary domain that is on your account (the domain you signed up with and haven’t changed). Also, replace addondomain.com with the extra domain that you added in the cPanel’s addon domains section.
If you do not want the additional domains to be a subfolder of the public_html, then reseller, VPS, or dedicated hosting is a better solution, as you can place 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 will be subfolders of the public_html folder.
Permissions
It is important that the public_html folder has the permissions of 0750.
Check to see that all files that are within the public_html folder are of the permissions 0755 or 0644.
Conclusion
The public_html folder is the sole point of contact between your web hosting account and the internet. It acts as the document root—the single place in the entire system where all the files that your site is composed of can be stored. Anyone with a hosted website must understand the importance of the public_html folder because it ultimately determines the availability and access to the files of your website. If you put your website files here, your site will be accessible, and users will be able to see the homepage, move between pages, and use your web app. The public_html folder also ensures that files critical to the functioning of the system and the configuration are secure, as they are stored in a separate part of the hosting system.