1 Answer
1

Create or edit the file called .htaccess in your web server's root directory and add the line:

Options -Indexes

Put blank index.html files in each subdirectory.

The first option is probably the best, unless you're distributing open source projects (like WordPress), when it's a good idea to use the blank index.html method to make sure subdirectories won't be listed by default for other people who download your project as well.

Perfect! Totally solved my problem. Using solution 1 for now, may have to use solution 2 at a later time if I use Wordpress or Drupal. Thanks for your help, Nick.
–
JaneNov 19 '12 at 11:49

1

You're welcome. WordPress already uses the blank index.html files in all directories, so you shouldn't have to worry about it with WP. (I was one of the people who proposed they add them for security reasons.) I don't think Drupal uses blank index files, though.
–
NickNov 19 '12 at 11:55

1

While WordPress includes index.html files in it's folders to prevent browsing folders without an index. Other folders on your shared account my be browseable if you have not set the Options -Indexes in your .htaccess file. Hostmonster as of now doesn't set this in their htaccess file and all folders are browseable by default so be careful to double check all your folder or your root level htaccess file.
–
AnagioNov 19 '12 at 13:35