1. Home
  2. General Use and Troubleshooting
  3. Disable Listings for a Specific Directory

Disable Listings for a Specific Directory

If you don’t want anyone to see what files you have within a directory when no ‘index’ file exists then you can turn off directory listings.

To turn off directory listings, simply create a file called .htaccess containing the line of code listed below and place it within the directory you want them to be disabled for:

Options -Indexes

Using the following line of code within a .htaccess file allows for directory listings to be enabled.

Options +Indexes

They are however enabled by default on our servers.

Updated on April 28, 2021

Was this article helpful?

Related Articles