Advanced

Indexes

Updated: 26 February 2024
cPanel Version: 118

What are Indexes?

Indexes in cPanel are essentially lists of files and folders that are found in your website's directories. When a visitor lands on a directory URL that doesn't have an index file, they'll see an index page showing the content of that directory. This index page is automatically generated by the web server.

Accessing Index Manager

To access the Index Manager in cPanel, follow these steps:

  1. Log into your cPanel account.
  2. Scroll down to the Advanced section.
  3. Click on the Indexes icon.

Using Index Manager

Once inside the Index Manager, you can use it to control how directories on your website are displayed to visitors. You can choose between four options: Default System Behavior, No Indexing, Standard Indexing, and Fancy Indexing. Here's how to use these settings.

Default System Behavior

This is the default setting. When selected, the server decides what type of indexing to use. If the directory contains an index file (like index.html or index.php), that file will be displayed. If no index file is present, a list of the directory's contents will be shown.

No Indexing

When this option is selected, visitors will see a 403 Forbidden message when they try to access a directory without an index file. Nothing in the directory will be visible to them.

Standard Indexing

With this setting, a plain list of all files and folders in the directory will be displayed when someone visits a directory without an index file.

Fancy Indexing

This option also shows a list of files and folders, but with additional information such as the last modification date and file size.

Setting Index Preferences

To set your index preferences for a specific directory:

  1. In the Index Manager, navigate to the directory you want to change.
  2. Click on the name of the directory.
  3. Select the indexing style you prefer.
  4. Click the Save button to apply the changes.

Remember

The changes you make in the Index Manager only apply to the directory you select and its subdirectories.

Security risk

Allowing directory listing by not using an index file can pose a security risk, as it allows anyone to see the contents of your directories.


External links

Indexes - cPanel Documentation