Search The Hostwinds Guides Knowledge Base

cPanel Indexes

Share:

This article is about using cPanel to manage the indexing of your folders. In order to prevent the listing of the contents of your folder, this is a way to ensure your website visitors are not able to view the contents of a folder that does not contain an index file such as index.php, index.html, index.htm or another filename that can serve as your homepage. This article is intended for a Shared Hosting, Business Hosting, Reseller Hosting or other clients who have purchased a cPanel license through Hostwinds are using cPanel on any of our Shared Web Hosting services. Hostwinds clients may notice that when viewing a directory, all of the files in that directory or folder are shown to a website visitor. 

How To Prevent Listing of Files in Your Directory

  1. Login into your cPanel account
  2. Navigate to the Advanced section
  3. Find the Indexes Icon cpanel indexes icon and click on it
  4. Click on the actual folder name such as public html folder nameand not the folder icon (cpanel folder icon)
  5. Check the Radio Button next to No Indexing to prevent your files from being shown when visiting your website
  6. Click the Save Button to save your changes
  7. Repeat this process for any other folders you have created that do not contain an index file to prevent the files from being listed when visiting your directories for any document roots such as public_html since these are publicly accessible to view from any web browser


If you would like to show the files in your directory, simple select Default System Setting, Standard Indexing (filename only), Fancy Indexing (filename and description)

Other Alternatives

  1. If a file named .htaccess exists in your public_html directory, first create a backup of this file so you can easily restore it
  2. Create or edit the existing .htaccess file in your public_html directory, or folder that you would like to restrict a list of files from showing
  3. Add the following line to your .htaccess file:
  4. Save the file and view your changes by visiting the folder in your web browser

Related Articles

Related Resources

If we can help you in any way, please submit a ticket, give us a phone call or join us in a Live Chat anytime. We are available 24/7/365 and we are dedicated to our client’s success; every client truly matters to us.


Share:

Leave a Reply

Your email address will not be published. Required fields are marked *