index.html, index.php, etc.). If no index page exists, the server may display a list of every file in that directory. The Indexes tool in cPanel lets you control this behaviour per directory.
Why this matters
A visible file listing can expose files you didn’t intend to be public — backup archives, configuration files, or uploads that aren’t linked from your site. Disabling directory indexes is a simple way to reduce this risk.Configure directory indexes
Open Indexes
Log in to cPanel through your client area or at
yourdomain.com/cpanel. Go to Advanced and click Indexes.Navigate to the directory
Browse to the folder you want to configure. Click a folder name to open it, or click Up One Level to go back.
Choose an index setting
Click Edit next to the directory and select one of the following options:
- Inherit — use the parent directory’s setting. If no parent setting exists, the server default applies.
- No Indexing — visitors see a “403 Forbidden” error instead of a file listing.
- Show Filename Only — display a plain list of file names.
- Show Filename and Description — display file names along with size and type information.
You can also disable directory indexes by adding
Options -Indexes to an .htaccess file in the relevant directory. The cPanel Indexes tool does the same thing through a visual interface.