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
- Log in to cPanel and open Advanced > Indexes.
- Browse to the required directory and click Edit beside it.
- Select No Indexing.
- Click Save.
Inherit uses the setting from the parent directory; it does not necessarily disable listings. The filename listing options enable listings.
Use File Manager instead
- Open Files > File Manager.
- Right-click the required directory and select Manage Indices.
- Select No Indexing and save.
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.
Important
Disabling directory listing does not block access to a file when someone knows its URL. Keep backups and private configuration outside public folders, or use appropriate access controls such as directory password protection.

