Understanding the File Structure

  • June 21, 2026
  • 0 Comments

Every account has a home directory (e.g., /home/youruser/). The important folders inside it:

  • public_html — the document root for your primary domain. Anything here is served on the web. Your site's index.html or index.php lives at the top of this folder.
  • public_html/subfolder or a separate folder — document roots for addon domains and subdomains (see "Managing Domains in cPanel").
  • mail, etc, logs, ssl — system folders. Don't move or delete these.
  • Files above public_html (directly in your home directory) are not web-accessible, which makes the home directory the right place for app code, secrets, and .env files.

Security tip: Never store passwords, API keys, or application source code that shouldn't be public insidepublic_html. Keep it one level up in your home directory.

How helpful was this article to you?

Posting has been disabled.