Quick summary
- What it is: public_html is the web server's root directory in your hosting account.
- What it's for: it helps manage hosting, files, accounts, performance and service tools.
- When to check it: when managing your hosting account, uploading files, reviewing resources or needing to make changes from the control panel.
public_html is the web server's root directory in your hosting account. It is the folder where you must upload your website files for them to be accessible from the browser through your domain.
What does it mean that it is the root folder?
When someone visits yourdomain.com, the server looks for your website files in the public_html folder. If you have an index.html or index.php file inside that folder, that is the one that will load when accessing the domain.
In other words: everything inside public_html is public and accessible from the Internet. Everything outside that folder (in parent directories) is not directly accessible from the browser.
How to access public_html?
You can access your public_html folder in several ways:
- Control panel file manager (DirectAdmin or cPanel): This is the simplest way. Go to the control panel and look for the file manager. You will see the
public_htmlfolder listed. - Via FTP or SFTP: By connecting with a client like FileZilla. After connecting, navigate to the
public_htmlfolder. - Via SSH: If you have SSH access, you can navigate to it with the command
cd ~/public_html.
What is the folder called in DirectAdmin?
In DirectAdmin, the full path is usually domains/yourdomain.com/public_html/. If you have additional domains, each will have its own public_html folder within domains/yourotherdomain.com/public_html/.
When will you encounter it?
The term public_html appears constantly in hosting guides:
- When uploading your first website to the server.
- When installing WordPress manually.
- When migrating a website from another provider.
- When resolving errors such as "blank page" or "403 Forbidden" due to incorrect permissions.
- When configuring redirects or adding the .htaccess file.
Why it matters in hosting
Understanding this concept will help you make better decisions when managing your service. In practice, it relates to managing hosting, files, accounts, performance and service tools. If it appears in a guide, the control panel or a support response, review the context before making changes.
Related articles
- Shared Hosting
- Control Panel
- DirectAdmin
- cPanel
- Backup