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_htmldirectory that the .htaccess file is in. - Select the
.htaccessfile. - Click "Edit File" in the middle of the menu bar.
- Then just type the following into your
.htaccessfile:Options -Indexes - Save the file.
