Allowing anonymous users to browse your directories via HTTP is a security risk. You should either create a blank index file or disable directory browsing. If you use cPanel, it is easy. Follow these steps.

Disable Directory Browsing from cPanel

  1. Login to cPanel

  2. Scroll down to Advanced OR type Index Manager in the Search (upper left) of cPanel

  3. Click on Index Manager

  4. A new window will appear, Select Document Root For: and Click Go

  5. In the Directory Listing, Click on / public_html /

  6. Select No Indexing and Click Save

You’ve now disabled directory browsing/indexing for your website via cPanel. This will added a line to your .htaccess file: Options All -Indexes