Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

What Is the public_html Folder?

The public_html folder is where your website files live. This guide explains what it is and how to use it.

Files and FTP2 min read8 steps

What is public_html?

When you buy hosting, your account gets its own space on a server. A server is a computer that is always on. The space is split into folders, like drawers in a cabinet. One of these folders is called public_html. It is the drawer that the whole world can look into. Anything you put there can be seen on the internet.

It is also called the document root. This is the folder the web server opens when someone visits your domain.

How it works

  • A file named index.html or index.php in public_html is your home page.
  • A file named about.html in this folder opens at yourdomain.com/about.html.
  • A folder named photos inside it opens at yourdomain.com/photos/.

What should go outside it?

Files that must stay private should not go in public_html. Examples are backups and private notes. The folders next to it in your home directory are not on the web.

Warning: Never delete public_html itself. If you do, your site will go offline. Take a backup before you delete or change files in it.

How to open it

  1. Log in to cPanel from your client area.
  2. Click File Manager in the Files section.
  3. Click public_html in the left list.
  4. You see your website files on the right.

How to add files

  1. Open public_html in File Manager.
  2. Click Upload at the top.
  3. Drag your files in, or click Select File.
  4. Wait for the bar to turn green, then go back.

You can also use FTP, a way to send files from your computer to the server. Programs such as FileZilla do this. Your welcome email lists the details.

Add-on domains

If you add another domain to the account, its files usually go in a folder inside public_html or next to it. The folder is shown when you add the domain.

Tip: Some setups use a different folder name, such as www. If you do not see public_html, ask Hostvento support.

Quick recap

  • public_html holds the files the world can see.
  • It is also called the document root.
  • Keep private files out of it.
  • Never delete the folder itself.