How to protect Directory Indexing?
Apache web server allow directory browsing by default. It?s always good to disable directory browsing in security aspect.
Disable directory browsing:
- Login to your CPanel,
- Click on Index Manager,
- Directory will be list down. Click on the directory name which you want to disable the directory browsing,
- Select No Index and click Save,
- The directory browsing feature should be disable by now.
Or,
Under public_html make .htaccess and put this line "Options -Indexes" over there. Thats it.