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.htmlorindex.phpinpublic_htmlis your home page. - A file named
about.htmlin this folder opens atyourdomain.com/about.html. - A folder named
photosinside it opens atyourdomain.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.
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
- Log in to cPanel from your client area.
- Click File Manager in the Files section.
- Click
public_htmlin the left list. - You see your website files on the right.
How to add files
- Open
public_htmlin File Manager. - Click Upload at the top.
- Drag your files in, or click Select File.
- 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.
www. If you do not see public_html, ask Hostvento support.Quick recap
public_htmlholds the files the world can see.- It is also called the document root.
- Keep private files out of it.
- Never delete the folder itself.