Directory and File Structure - Linux

Directory/Folder Structure

From amongst the several directories found within your cPanel account, only the following are important:

Directory Contents

/public_html  contains all files that are part of the website. Any file and folder inside this directory is visible over the Internet unless you password protect it.
/www  is simply a link to the public_html directory.

File Structure

Our cPanel hosting servers will check for the existence of one of the below files and based on the order specified below, display it's content as the Home Page, when anyone tries to list the content of any folder/directory:

  • index.html
  • index.htm
  • index.php
  • index.php3
  • index.php4
  • index.shtml
  • default.html
  • default.htm
  • default.php
  • home.html
  • home.htm
  • home.php
  • index.pl
  • home.pl
  • default.pl


Examples

  • If you were to upload a file index.html within the public_html folder of your website somedomain.com, then when someone tries to reach either somedomain.com or www.somedomain.com, then they would be automatically displayed the content of the index.html file. This happens since our server treats the index.html as the home page or default page for this directory.
  • Similarly, if you were to upload an index.html file within the /public_html/plants folder, then when someone types somedomain.com/plants or www.somedomain.com/plants, then they would be automatically displayed the content of the index.html file within the plants folder.
  • Now, if you were to upload two or more files from amongst the list given above, then the one mentioned higher in the order would be considered as the home page. So in the event that there exists an index.php and default.html file within the same folder, then the index.php file will get considered as the home page.
  • cPanel, cPanel Linux
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I access cPanel?

1. Managing your Linux Hosting package through your web browsercPanel can be accessed by using...

Uploading Content to your cPanel Linux Hosting Package

To upload content to your Hosting package through an FTP client, use only FTPS on Port 21.Some...

SymLinks Settings of cPanel Linux Hosting packages

Linux Hosting packages do not support the "FollowSymlinks" option in the .htaccess file. This...

PHP Memory Limit Error

Allowed Memory Size Exhausted Errors Fatal error: Allowed memory size of 12582912 bytes...

How do I unblock port 80/443?

Go the "Client Area"Click Services> My ServicesChoose hosting plan and click on the planClick...

Powered by WHMCompleteSolution