> ## Documentation Index
> Fetch the complete documentation index at: https://speedypage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Directory indexes

> How to control whether visitors can see a file listing when no index page exists in a directory.

When someone visits a URL that points to a directory rather than a specific file, the server looks for an index page (`index.html`, `index.php`, etc.). If no index page exists, the server may display a list of every file in that directory. The Indexes tool in cPanel lets you control this behaviour per directory.

## Why this matters

A visible file listing can expose files you didn't intend to be public — backup archives, configuration files, or uploads that aren't linked from your site. Disabling directory indexes is a simple way to reduce this risk.

## Configure directory indexes

<Steps>
  <Step title="Open Indexes">
    Log in to cPanel through your [client area](https://my.speedypage.com) or at `yourdomain.com/cpanel`. Go to **Advanced** and click **Indexes**.
  </Step>

  <Step title="Navigate to the directory">
    Browse to the folder you want to configure. Click a folder name to open it, or click **Up One Level** to go back.
  </Step>

  <Step title="Choose an index setting">
    Click **Edit** next to the directory and select one of the following options:

    * **Inherit** — use the parent directory's setting. If no parent setting exists, the server default applies.
    * **No Indexing** — visitors see a "403 Forbidden" error instead of a file listing.
    * **Show Filename Only** — display a plain list of file names.
    * **Show Filename and Description** — display file names along with size and type information.

    Click **Save**.
  </Step>
</Steps>

<Tip>
  Set `public_html` to **No Indexing** and let it inherit down to all subdirectories. You can then override individual directories if you actually want a file listing somewhere.
</Tip>

<Note>
  You can also disable directory indexes by adding `Options -Indexes` to an `.htaccess` file in the relevant directory. The cPanel Indexes tool does the same thing through a visual interface.
</Note>
