If there is no index file to display your website, it will show the directories and other files. This is not secure to display all the files and folders of the website. For security purpose, we will disable the Directory Browsing. Following are the steps to disable the Directory Browsing.
- Login to your cPanel.
- Click on the Indexes inside Advanced. It will display the Directory tree.
- Select Up One Level and click the domain to Disable the Directory of the entire Website.
- Tick on No Indexing and hit the Save Button.
This is it. Anyone try to access the files will get 403 Forbidden.