FTP File Placement and Public Accessibility Print

  • 0

Understanding Public Web File Locations (public_html)

When connecting to your hosting account via FTP (File Transfer Protocol), you are usually placed in the root directory of your account. This root directory contains various configuration files and folders, but most of these files are not directly visible to the public internet.


Standard File Placement

For your website files to be publicly accessible and visible when someone enters your domain name into a browser, they must be placed inside the **public_html** folder. This folder is the designated web root directory for your primary domain. When a user accesses your domain, the web server is configured to immediately look inside the public_html directory to retrieve and display the requested content.

**Analogy:** Think of the root directory as the entire computer hard drive, and the public_html folder as the specific folder you've marked as "Shared" for web viewing. Files outside this "Shared" folder remain private.


Troubleshooting and Advice

  • **Empty Website Error:** If you upload your files and your website still shows a generic "Index of" page or a blank screen, you likely uploaded the files to the root directory instead of inside the public_html folder. **Correction:** Move all files, including index.html or index.php, into the public_html directory.
  • **Index File Naming:** Ensure your primary page is correctly named. Standard web servers look for files named **index.html**, **index.htm**, or **index.php** by default. If your main page has a different name (e.g., home.html), the server will not automatically load it, resulting in a directory listing or an error.
  • **Subdomains and Addon Domains:** If you are setting up files for a subdomain or an addon domain, remember that they will have their own dedicated folder, often located parallel to, but not inside, public_html. For example, an addon domain's files might be in a folder named `myaddondomain.com`. **Advice:** Always check the Document Root specified when the domain or subdomain was created in cPanel.
  • **File Permissions (CHMOD):** If your files are in public_html but still don't load, check the file permissions. Web content files (HTML, PHP) usually require permissions set to **644**, and directories (folders) require permissions set to **755**. You can typically adjust these permissions within your FTP client.
Always double-check your file path: files for the primary domain must reside directly inside the public_html folder.

Was this answer helpful?

« Back

Powered by WHMCompleteSolution