Guides & Tutorials

hosting image

How to disable directory browsing using .htaccess?

For security purposes, we recommend you to disable directory browsing on your website. So that no one can see the files/folders of your website.
You can disable Directory Browsing by adding this line to your .htaccess file.

  • Firstly, you find the “Files” area and select the “File Manager” text or click this icon shown in the given below.

disable directory browsing

  • Click the “Settings” button, It will show you a dialog box.
  • In Dialog box, you need to mark(select) the checkbox “Show Hidden files(dot files) “ and press the “save” button.

disable directory browsing

disable directory browsing

  • After the Dialog box is closed, you need to find the File Directory named “.htaccess”
  • Now you need to enter these commands to your .htaccess file.

You can block the Directory Browsing by enter this command to your .htaccess file.

Options -Indexes

Thanks for reading it.

For directory backup read this Backup directory. To protect your htaccess file click here.