Knowledge Base
Categories: ,

Public_HTML and 'WWW' Folders



The public_html folder is the web root for your primary domain name. This means that public_html is the folder where you put all website files which you want to appear when someone types your main domain (the one you provided when you signed up for hosting).

In other words, when someone types your domain name into their browser, whatever is in the public_html folder is what will be shown to them.

EXAMPLE If you have a file called index.html (or any of the other default filenames) in the public_html folder, it will display that page. If you do no have 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 shown (which is not cool, because people will see what you have on the backend of your website without actually SEEING your website).
To see the path in File Manager with the corresponding URL in a web browser, see:

  • /public_html/ --> http://www.yourdomain.com/

  • /public_html/pagename.html --> http://www.yourdomain.com/pagename.html

  • /public_html/folder/ --> http://www.yourdomain.com/folder/

  • /public_html/folder/page.html --> http://www.yourdomain.com/folder/page.html

    Note: replace yourdomain.com with the primary domain on your account (the one you originally signed up with, unless you changed it).

Public_HTML vs 'WWW'

Public_HTML and 'www' folders are NOT the same.

  • Public_html is the main place your public files are stored in for your websites and general public content.

  • 'www' is just a shortcut to public_html (all files uploaded to 'www' actually end up in public_html).

This type of links are known as symbolic links.

Add-ons and Subdomains

You can also create add-on domains and subdomains, and these will use a folder inside public_html.

Example If you create an add-on domain called addondomain.com it will use a subfolder similar to /public_html/addondomain.com/ (unless you specified otherwise). Or you could create a subdomain called orangetimes.yourdomain.com and it would use a subfolder similar to /public_html/orangetimes/ (unless you specified otherwise).

If orangetimes.yourdomain.com is defined as a subdomain, and addondomain.com is defined as an add-on domain, then the following examples apply (the path in File Manager corresponds to the URL in a web browser):

  • /public_html/orangetimes/ --> http://orangetimes.yourdomain.com/

  • /public_html/addondomain.com/ --> http://www.addondomain.com/

    Note: replace yourdomain.com with the primary domain on your account and replace addondomain.com with the additional domain you added in the Addon Domains section of cPanel.

If you do not want additional domains to be subfolders of public_html, then a Reseller, VPS or Dedicated hosting plan might be a better solution for you, since you can put each domain in its own cPanel to keep it separate from other domains. Shared accounts only get one cPanel, which is why all add-on domains are subfolders of the public_html folder.

Did you find this article helpful?

* Your feedback is too short