Directory listing shows the files in a website folder when no index page is available. This guide explains how to turn that listing off in cPanel.

Use the Indexes tool

  1. Log in to cPanel and open Advanced > Indexes.
  2. Browse to the required directory and click Edit beside it.
  3. Select No Indexing.
  4. Click Save.

No Index

Inherit uses the setting from the parent directory; it does not necessarily disable listings. The filename listing options enable listings.

Use File Manager instead

  1. Open Files > File Manager.
  2. Right-click the required directory and select Manage Indices.
  3. Select No Indexing and save.

 directory

Test the directory

Open the directory’s web address where no index page exists and check that a file listing is no longer displayed. A folder with an index page may still display that page normally.