How to stop file listing on your site (Indexes, cPanel)
If a site folder has no index.php or index.html, the server may show a list of all files in it - an "Index of /..." page. Strangers can then see backups, uploads and service files. On our hosting the file list is off by default; if your site still shows "Index of", close it as described below.
- Open "Indexes" (group "Advanced").
- Click "EDIT" next to
public_html(or the folder of the site).

- Choose "No Indexing".
- Click "Save".

The setting applies to this folder and all subfolders set to "Inherit". Instead of the file list the visitor gets a 403 error.
With .htaccess
Options -IndexesAdd this line to .htaccess in the site folder - same effect.
WordPress and other CMS put empty index.php files in their folders, but upload and backup folders often lack them. Disabling listing at public_html closes everything at once.
If you need the file list
For example, for a downloads folder: choose "Show Filename Only" or "Show Filename and Description" for it - or add Options +Indexes to its .htaccess. Other folders stay closed.