Loading...

Knowledge Base

How to Customize a Directory with Indexes

Indexes can prevent visitors from viewing a list of files in a folder (the Index of/ page that appears when an index.html file is not present).

If a directory on a website does not contain an index file, the server will, by default, display a list of all files in that directory in the visitor's browser.

Customize a Directory with Indexes

To customize a directory with Indexes:

Configure directory settings

  1. Log in to cPanel.
  2. Look for the Advanced section, then click on Indexes.

    HostGator - cPanel - Indexes icon
     

  3. Click Settings on the Indexes page.

    HostGator - cPanel - Indexes Settings
     

  4. Select the location from which you want to begin navigation:

    HostGator - cPanel - Indexes Settings Optiions
     

    • Home: Begin navigation in the home directory for the domain.
    • Web Root: Begin navigation in the document root for the account's primary domain.
    • Document Root for: Select the domain that corresponds to the document root in which you want to begin navigation.
  5. (Optional) Select Always open this directory in the future to automatically open the selected location whenever you access the Indexes interface.
  6. Click Save Changes.

Manage index settings

  1. Navigate to the folder or subfolder you want to configure.
    1. Click a folder icon or folder name to open the directory.

      HostGator - cPanel - Indexes Open Folder
       

    2. Click Up One Level to move up one directory level.
    3. Click Home to return to the home directory.
    4. Click a parent directory to view and select its subdirectories.

      HostGator - cPanel - Indexes Directory
       

  2. Click Edit in the Actions column for the directory or subdirectory you want to configure.
  3. Select the desired index setting:

    HostGator - cPanel - Indexes - Set Indexing
     

    • Inherit: Uses the parent directory's index setting. If no parent setting exists, the system default is used.
    • No Indexing: Prevents the server from displaying directory contents.
    • Show Filename Only: Displays a list of filenames only.
    • Show Filename and Description: Displays filenames and additional details, such as file size and file type.
  4. Click Save.

The selected index setting will appear in the Index Type column of the Indexes interface.

Need further assistance? Please contact us via phone or chat so we can assist you!

Loading...