New Feature Announcement: Master Your Email Delivery with the Mail Delivery Center

Enable directory index listings using .htaccess

You can configure the webserver to display file listings for directories that do not have a directory index page.

By default on WebGee servers, when visitors go to a URL that requests a directory, such as http://example.net/gallery, the web server looks for the default directory index page. If the directory index page does not exist, the webserver displays a “403 Forbidden” error message. This is because directory index listings are disabled by default for security reasons.

In some cases, however, you may want to enable index listings for a directory. To do this, use a text editor to add the following line to the .htaccess file:

Options +Indexes


This directive enables standard indexing, where the index listing shows only the filenames.

You can enable directory index listings for your entire website, though for security reasons this is not recommended. If you are sure you want to do this, add the Options +Indexes directive to the .htaccess file in the public_html directory.

Disable directory index listings

Directory index listings are disabled by default, so you only need to explicitly disable them if they were previously enabled in an .htaccess file. To do this, use a text editor to modify the Options line in the .htaccess file as follows:

Options -Indexes
  • 226 Users Found This Useful
Was this answer helpful?

Related Articles

 Connect to your server via SSH

SSH allows secure file transfer and remote logins over the internet. Your connection via SSH is...

 How to force your site to use SSL (HTTPS) using

First of all, you will need to install an SSL certificate to your siteOnce your certificate is...

 How do I change PHP versions, or change my PHP settings / config?

The process of setting your PHP version and the 'variables' (such as memory_limit values) differs...

 How do I install a free SSL via cPanel?

Installing an SSL certificate in cPanel is easy! Best of all, it's free with WebGee!Important:...

 How to send emails in WordPress using the WP SMTP Mail plugin

Instead of using the default PHP mail() function, you can send emails using our SMTP services via...

Powered by WHMCompleteSolution