How to disable directory browsing using .htaccess?

Web Hosting 1 min read Posted on 02 May 2026 Updated on 04 May 2026 16,649 views
How to disable directory browsing using .htaccess?
For security purposes, we recommend that you to disable directory browsing on your website so no one can see the files/folders of your website.
You can disable Directory Browsing by adding this line to your .htaccess file.

Options -Indexes