How do I disable directory browsing?

By default, if you don't have an index file in a web accessible folder, when accessed through a browser, its contents will be listed.

To prevent the listing of the folder's contents, you should add the following line to the .htaccess file in the folder (if there is no .htaccess file, you can easily create a new one):

Options -Indexes

Was this answer helpful?

 Print this Article

Also Read

Propagation Times

Propagation is the process of updating a domain with new nameserver (DNS) information across all...

What are PHP, Perl, Python, and Ruby on Rails?

Those are all web programming languages, also known as scripting languages. PHP is the most...

What are parked and addon domains? What about subdomains?

A Parked domain is a domain name that leads to the same website as another domain name. The...

How To Edit Your Hosts File (Windows, Mac, Linux)

Modifying your hosts file allows you to override the DNS for a domain, useful when you want to...

How to traceroute in Windows, Linux and Mac OS?

Here are instructions on how to perform a traceroute check on different operating systems:...