Linux Directory/Folder Structure

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

/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

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

  1. index.html

  2. index.htm

  3. index.php

  4. index.php3

  5. index.php4

  6. index.shtml

  7. default.html

  8. default.htm

  9. default.php

  10. home.html

  11. home.htm

  12. home.php

  13. index.pl

  14. home.pl

  15. default.pl


Examples


  • If you were to upload a file index.html within the public_html folder of your website mydomain.com, then when someone tries to reach either mydomain.com or www.mydomain.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/blog folder, then when someone types mydomain.com/blog or www.mysomedomain.com/blog, then they would be automatically displayed the content of the index.html file within the blog 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.

Found this article interesting?
Subscribe to DomainRegister´s newsletter!

You can unsubscribe at any time by simply clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp s privacy practices here.

  • cPanel, Linux hosting
  • 3 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

 Shared Linux Hosting Plans Technical Specifications

    Cardboard Basic Starter disk space 10 MB 1 GB 2 GB monthly traffic 20...

 Reseller Linux Hosting Plans Technical Specifications

    Starter disk space as provided by plan monthly traffic as provided by plan...

 DNS Configuration for Shared Hosting Plans

In order to use our Linux Shared Hosting Plans, you need point the domain using one of the...

 How to backup your site to a FTP server with cPanel

cPanel offers an easy and powerful way to backup your site, storing your backup set on a remote...

 How To Redirect Your Site Using .htaccess

There're various kinds of different redirect operations you can do using .htaccess301 (Permanent...