1. Home
  2. Knowledge Base
  3. Website
  4. Website Tips
  5. Public_html vs WWW: What Is the Difference in cPanel?

Public_html vs WWW: What Is the Difference in cPanel?

Published Date: 19 November 2026
Last Updated/Reviewed Date: 07 November 2026
cPanel version: 138.0.25

Quick Answer

Public_html vs www is a common question among website owners using cPanel hosting. Both directories appear in the cPanel File Manager, but they are not separate copies of your website.

In a standard cPanel hosting account, the public_html directory stores the website files for your primary domain, while www is a symbolic link that points to the same directory.

Understanding the difference between public_html vs www helps you manage website files, upload content correctly, and avoid accidental file deletion.

What Is public_html?

The public_html directory is the default document root for the primary domain in a standard cPanel hosting account.

It contains the files used to display your website, including:

  • Other website resources
  • HTML and PHP files
  • Website images and media
  • CSS and JavaScript files
  • WordPress installation files

What Is WWW?

The www directory is normally a symbolic link, also known as a shortcut, that points to public_html.

This means both locations provide access to the same files.

For example, if you upload an image using the www directory, you can also find that image in public_html.

Similarly, editing or deleting a website file through either location affects the same underlying file.

Public_html vs WWW: Key Differences

Although public_html and www appear as separate entries in cPanel File Manager, they normally access the same website content.

Featurepublic_htmlwww
Directory typeActual directorySymbolic link
Main purposeStores website filesProvides alternate access
File uploadsSupportedSupported
File modificationsAffect the websiteAffect the same files
Recommended usagePrimary upload locationAlternative access

How to Find the Correct Website Root Directory in cPanel

Before uploading website files, it is important to identify the correct document root directory.

Follow these steps:

  1. Log in to your cPanel account.
  2. Navigate to the Domains section.
  3. Select Domains to view the domains configured in your account.
  4. Locate the domain you want to manage.
  5. Check the Document Root column to identify the directory associated with that domain.
  6. Open File Manager and navigate to the corresponding directory.

The primary domain generally uses public_html, while addon domains and subdomains may use different directories.

Common Mistakes When Managing public_html vs www

Understanding public_html vs www can help prevent common website management mistakes.

Uploading files to the wrong directory: Always verify your domain’s document root before uploading website content. Files uploaded outside the correct directory may not appear on your website.

Deleting duplicate-looking files: Since www normally points to public_html, files displayed in both locations are not separate copies. Deleting files through either location may remove them from your website.

Confusing www with a domain prefix: The www folder in cPanel is different from the www prefix in a domain name. The folder is a filesystem shortcut, while the domain prefix is a hostname configured through DNS and server settings.

Modifying important website files: Always maintain a backup before changing PHP files, WordPress configuration files, or other important website resources.

Best Practices for Managing Website Files

To maintain a secure and properly organized website, use the following practices:

  • Upload your primary website files to the correct document root.
  • Maintain regular backups of website files and databases.
  • Avoid storing sensitive documents inside publicly accessible directories.
  • Verify file permissions before making changes.
  • Use cPanel File Manager or a secure file transfer method when managing website content.

Following these practices can help keep your website organized and reduce the risk of accidental errors.

Frequently Asked Questions (FAQ)

1. Are public_html and www two separate folders?

No. In a standard cPanel setup, www is a symbolic link to public_html, not a separate directory.

2. Where should I upload my website files?

You can upload your website files to public_html. The www link accesses the same location.

3. Will deleting files from www affect public_html?

Yes. Since both refer to the same directory, deleting or modifying files through either location will affect the website files.

Summary

public_html is the primary website directory, while www acts as a shortcut to it. Both provide access to the same files in a standard cPanel configuration.

Need Assistance? 

Having trouble in checking the hidden files in the cPanel account? 

The ORYON Support Team can assist with checking the hidden files present in your account.

For further assistance, please contact our support team. 

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support