HostMonster Web Hosting Help

Stopping Display of All files on Web page

Problem:

How to Stop A Directory Index From Being Shown

Solution:

Sometimes, for one reason or another, you will have no index file in your directory. This will, of course, mean that if someone types the directory name into their browser, the Index of / page will appear with a full listing of all the files in that directory will be shown. This could be a security risk for your site.

Note: You can also manage the index settings through the cPanel interface.

To prevent against this (without creating lots of new 'index' files, you can enter a command into your .htaccess file to stop the directory list from being shown:

Options -Indexes
Knowledgebase Article 79,853 views bookmark tags: directory htaccess index (updated 696 days ago)


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

How do I display my home page which is using a name other than index.html? (updated 697 days ago)
Knowledgebase Article 93,475 views tags: directory homepage htaccess index order

Explains the use of DirectoryIndex and how to use it. (updated 441 days ago)
Knowledgebase Article 8,218 views tags: cpanel htaccess

If suddenly when you go to your page, you get nothing on the page. You can still get HTML to display, just not PHP. To serve HTML pages to browsers, we don't associate the Apache processes with your 2 (updated 1664 days ago)
Knowledgebase Article 50,922 views tags: page php

Related Help Content

How do I make a sub directory (or sub folder) act as the public_html for your main domain? (updated 145 days ago)
Knowledgebase Article 302,305 views tags: Drupal domain htaccess joomla wordpress

What is the .htaccess file and where can I find more information? (updated 365 days ago)
Knowledgebase Article 1,103,811 views tags: htaccess tips tricks

Preventing bandwidth theft using the mod rewrite engine and .htaccess (updated 636 days ago)
Knowledgebase Article 68,190 views tags: htaccess rewrite

What is the Index Manager? How do I use the Index Manager? (updated 1616 days ago)
Knowledgebase Article 74,296 views tags: index manager

I am trying to rebuild my index for Entropy Search and it stops before 100%. (updated 1653 days ago)
Knowledgebase Article 49,182 views tags: index search

The redirection of www.yourdomain.com/default.html or index.html to http://www.yourdomain.com/index.php?act=whatever redirects it to http://www.yourdomain.com/index.php%3fact=whatever In other words, (updated 74 days ago)
Knowledgebase Article 616,308 views tags: htaccess messing mod php redirect redirects rewrite variable variables

How to run CGI scripts for Addon domains. (updated 633 days ago)
Knowledgebase Article 74,000 views tags: cgi htaccess

What to do if Google has indexed your addon domain with https (updated 976 days ago)
Knowledgebase Article 21,473 views tags: google htaccess https index