If you don’t have an index file in every directory the contents of the directories are open for viewing. This can be a serious security issue.
- First, log in to your cPanel.
- Click "File Manager".
- Choose the
/public_html
directory that the .htaccess file is in. - Select the
.htaccess
file. - Click "Edit File" in the middle of the menu bar.
- Then just type the following into your
.htaccess
file:Options -Indexes
- Save the file.