---
title: "Displaying directory contents"
date: "2014-10-31"
category: "web-content"
slug: "displaying-directory-contents"
---

## Overview

You can configure the web server to display a listing of all files in a directory instead of serving a default page.

## Enabling Directory Listings

Create a file named `.htaccess` in the target directory with the following line:

```
Options +Indexes
```

You must also remove all index files (e.g. `index.html`, `index.php`, `index.htm`) from the directory. Index files always take precedence over the `Indexes` directive.
