How to Enable or Disable Directory Indexing in cPanel ?

November 17, 2025

Directory Indexing controls whether visitors can view a list of files in your website directories. TZSMM Host guides you on enabling or disabling directory indexing in cPanel to secure your website files.

Step 1: Log in to cPanel

Access your cPanel account at https://yourdomain.com:2083 and log in using your credentials.

Step 2: Navigate to Indexes

Scroll down to the Advanced section in cPanel and click on Indexes. This tool allows you to control the directory listing for your website folders.

Step 3: Select the Directory

Choose the folder you want to modify. Click Go next to the desired directory. Commonly, the public_html folder contains your main website files.

Step 4: Choose Indexing Option

Select one of the available options:

  • No Indexing: Prevents visitors from seeing the file list.
  • Standard Indexing: Shows a simple list of files in the directory.
  • Fancy Indexing: Displays files with additional information like size and date.

Step 5: Save Changes

After selecting your preferred indexing option, click Save to apply the changes. The directory will now behave according to your chosen setting.

Step 6: Test the Directory

Open your browser and navigate to the directory URL (e.g., https://yourdomain.com/folder/) to verify the changes. Ensure indexing behaves as expected.

Conclusion

Properly managing directory indexing improves your website’s security by preventing unauthorized access to files. Use cPanel’s Indexes tool to enable or disable directory listing for any folder on your site. TZSMM Host provides guidance to help you maintain a secure and organized website environment.

Was this answer helpful?

36 Users Found This Useful (117 Votes)

Comments