What are the "www" and "public_html" folders on my hosting? Print

  • cpanel, public_html
  • 0

In this guide, we will explain what the "www" and "public_html" folders are on your cPanel, as well as where they are located and how to access them.


www

This directory is something called a "symlink (symbolic link)". It points to the "public_html" folder and is generally used as a shortcut (similar to a Windows shortcut). It is simply a symbolic link to the "public_html" folder. Everything that exists in the "public_html" folder will also exist in "www" which means that the paths "/home/yourusername/public_html" and "/home/yourusername/www" will point to the same "public_html" folder. Any file that exists in either of those two folders will be identical when viewed from the other directory on the hosting.


public_html

This folder is a folder in which files that are readable on the web are placed. It's a folder where you put all the files you want to be visible when someone types in your domain. We can explain this with an example: If you have a default file name like "index.html" or "default.html" in the "public_html" folder, and when someone calls your domain name, they will display that page. If you do not have a default file in the "public_html" folder, a list of files in the "public_html" folder will be displayed. When you create an addon domain on your hosting named "example.com" it will use a subdirectory like "/public_html/example.com/" or if you added a subdomain named "mysubdomain" then it will use a subdirectory like "/public_html/mysubdomain/".

On shared hosting accounts, you get one cPanel account, which is why all addon domains are subdirectories of the public_html folder.

How to access the public_html folder?

  • Log in to cPanel
  • In the "Files" section, click on "File Manager"

public html

  • You will see the "public_html" folder in the list, double click to access the folder

publichtml2

  • "public_html" folder must always have 0750 permissions. All folders in it must have 0755 permissions and all files in it must have 0644 permissions.

publichtml3

publichtml4



Was this answer helpful?

« Back