Directory browsing allows visitors to your site to see and browse through the contents of folders on your web site. Anyone on the web could potentially visit a directory on your site, see what files exist there and open them at will. Typically, web hosts disable directory browsing for security reasons. However, there are still plenty of web hosts out there that don’t disable it.


How to Check Your Site

You can check to see if directory browsing is enabled on your site by creating a folder and adding a basic text file. If you visit the directory in your web browser and it displays a link to the text file, then directory browsing is enabled.

like this image :

Disable Directory Indexes

If you get a ‘Page Not Found’ or ‘Forbidden’ message, then directory browsing is disabled.



to protect your self from this common issue go to public_html and and edit the .htaccess file.

add this code  :

Options -Indexes

the server will stop browsing the directory after you add this code


Written by