cPanel Index Manager

 

Index Manager in cPanel controls what visitors see when they browse to a directory on your website that does not contain a default index file such as index.html or index.php. You can use it to prevent directory contents from being displayed, or to choose how files are listed when directory browsing is intentional.

For most public website folders, disabling directory indexing is recommended. An open directory listing can reveal file names, backups, images, scripts or other information that should not be publicly visible.

How directory indexing works

When a visitor requests a folder rather than a specific file, the web server first looks for a default index file. If it finds one, the file is normally displayed. If no default index file exists, the server applies the directory indexing setting for that folder.

Index Manager lets you change this behaviour from cPanel without manually editing server configuration files. The setting applies to the directory you select and may also affect subdirectories, depending on the server configuration.

When to use Index Manager

You may use Index Manager to:

* Prevent visitors from browsing the contents of a website folder.

* Allow visitors to browse files in an intentionally public downloads directory.

* Control the display of an image, document or media directory.

* Troubleshoot why a folder displays a list of files instead of a webpage.

* Review directory behaviour after a website migration, restoration or manual file upload.

Before you begin

Before changing the setting, make sure you have:

* Access to the correct cPanel hosting account.

* The domain name and folder path you want to manage.

* Permission to change settings for the hosting account.

* Confirmed whether the folder should be publicly browsable.

Do not use directory listing as a method of protecting confidential information. Sensitive files should not be stored in a publicly accessible web directory. Use suitable access controls, application permissions and secure storage instead.

[Screenshot: cPanel home page showing the Indexes or Index Manager option]

How to change directory indexing in cPanel

1. Log in to cPanel for the relevant hosting account.

2. Locate the Advanced section.

3. Select Indexes or Index Manager. The name may vary depending on the cPanel theme.

4. Browse the folder tree and select the directory you want to configure.

5. Review the path shown on screen to confirm that you selected the correct directory.

6. Select the required indexing option.

7. Select Save to apply the change.

8. Open the directory URL in a web browser and confirm that it behaves as expected.

9. Return to the folder settings and select a different option if the result is not suitable.

[Screenshot: Index Manager directory selection screen]

[Screenshot: Indexing options page in cPanel]

Indexing options

Default System Setting

This uses the default directory behaviour configured for the hosting server or account. It is useful when you want the folder to follow the normal hosting configuration rather than applying a specific custom setting.

No Indexing

This prevents the contents of the directory from being displayed as a file list. If the directory does not contain a default index file, visitors will commonly receive a forbidden or access denied response instead.

No Indexing is generally the safest choice for public website folders unless you have a specific reason to allow directory browsing.

Show Filename Only

This displays a basic list of files in the directory. Visitors may be able to view, open or download those files, so only use this option for content that is deliberately public.

Show Filename and Description

This displays file names together with available descriptions. It can be useful for a public file repository, but it should not be used for folders containing private, temporary or sensitive information.

Best practices and security considerations

* Use No Indexing for folders that should not be browsed publicly.

* Add an appropriate default index file to folders that are intended to display a webpage.

* Do not store backups, database exports, configuration files or confidential documents in public web folders.

* Review directory settings after moving or restoring a website.

* Test the folder from a private browsing window so that cached results do not affect your review.

* Remember that hiding a directory listing does not make a known file URL secure. A visitor who knows the exact URL may still be able to access a file unless separate access restrictions are configured.

Troubleshooting

A folder is showing a file list unexpectedly

This usually means the folder does not contain a default index file and directory listing is enabled.

Check the following:

* Confirm that the folder contains the expected file, such as index.html or index.php.

* Confirm that you changed the setting for the correct folder.

* Open Index Manager and select No Indexing if the folder should not be browsable.

* Check whether the website was recently migrated or restored and the index file was omitted.

The setting does not appear to work

If the change is not visible immediately:

* Clear the browser cache or test in a private browsing window.

* Confirm that the domain is loading from the expected hosting account.

* Check whether application rules or an .htaccess file are overriding the directory behaviour.

* Confirm that the change was saved successfully in cPanel.

Index Manager is not available

The feature may be named Indexes rather than Index Manager. Look for it in the Advanced section of cPanel.

If neither option is available, the hosting account may have feature restrictions or may use a different control panel. Confirm the hosting service and contact Apexhost Support if you need help identifying the correct control panel.

Frequently asked questions

Does Index Manager create an index file?

No. Index Manager changes how the server behaves when a directory does not contain a default index file. It does not create, rename or edit website files.

For most public website folders, No Indexing is recommended unless the folder is deliberately intended to provide a public file listing.

Can Index Manager protect private files?

No. It can prevent a directory listing, but it is not a complete access-control system. Use appropriate authentication, permissions and secure storage for private information.

Can I change the setting later?

Yes. You can return to Index Manager at any time and choose a different option for a directory that you manage.

cPanel

How To: Set Up a cPanel Hosting Space for a Customer + Extra Services

Apexhost Linux Login Pages

Signing In to Control Panel

Need More Help?

If you require further assistance, please contact Apexhost Support at support@apexhost.com.au.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Getting Started with cPanel

This article introduces cPanel for Apexhost customers and explains what it is...

Logging into cPanel

cPanel is the main control panel used to manage Linux hosting services. If...

cPanel File Manager

File Manager in cPanel is a browser-based tool that allows you to view,...

cPanel Passwords

cPanel hosting passwords protect access to your hosting control panel, email...

cPanel Contact Information

Keeping your cPanel contact information up to date helps ensure you receive...