Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Web Hosting FAQ  >  Steps to Modify Apache Directory Listing Style
Top Scroll

Steps to Modify Apache Directory Listing Style

 2 min

If someone accesses a directory with no index file (index.html, index.php, index.htm, etc.) on your hosting account that user will either see the files’ list in that directory, or a forbidden message. This doesn’t allow them to access the contents of the directory. You can allow/deny the permissions for displaying the folder content. In case you display the contents, you can also configure the type of information that will appear on the page.

Generally, the folder indexing is disabled on our servers for enhanced the security of our customer’s accounts.

Standard Indexing

With the standard indexing, only the file names are displayed when anyone accesses the folder without any other information for the files in that location. For using this type of indexing, add the below lines in a file named .htaccess in the desired folder:

Options +Indexes
IndexOptions -FancyIndexing

Fancy Indexing

With fancy indexing, the files plus additional information is displayed about them such as the date the file is last modified, its size and description. For using this type of indexing, add the below two lines in .htaccess file in the destination folder:

Options +Indexes
IndexOptions +FancyIndexing

No Indexing

In case, you don’t want a folder without an index file on your account to display the list of files located inside it, you can disable the indexing functionality. For this, you need to add the below line in the .htaccess file in the required directory:

Options -Indexes

So, if someone accesses the folder in their browser, they will receive a 403 Forbidden message.

In this way, you can modify the Apache directory listing style.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.