[HowTo]Turn Off Directory Listing in Apache Web Server

Today i found that my web server doesn’t make Directory Listing by default. And this can be a vulnerable for WordPress since wp-content directory can be exploit. So test your blog, if your web server doesn’t turn off the directory listing by default please follow this steps (only works for Apache web server):

  1. Create or Edit existing .htaccess
  2. Add this code there: Options -Indexes
  3. Save and close .htaccess file
  4. Test It!

That step will turn off the Directory Listing. Thank you for reading, and have a nice day… 🙂

Comments

  1. Nicole says:

    Very useful, thank you! Worked perfectly.

  2. Nicole says:

    Very useful, thank you! Worked perfectly.

  3. Weboide says:

    Thanks!

  4. newbI says:

    How do i test my wordpress directory listing?

  5. Mike says:

    What a simple solution. I was adding dummy index.html files to folders to prevent directory listing. This is MUCH easier. Thanks for the information! 🙂

  6. Scarlett says:

    Only just came across this whilst searching how to stop directory listing, so simple! Thanks so much =)

  7. Mick says:

    Thank you for sharing this knowledge.

Give me your feedback

This site uses Akismet to reduce spam. Learn how your comment data is processed.