Blog

Set Directory Index File Priority — Step-by-Step Guide

June 11, 2026 2 min de lectura

Set Directory Index File Priority — Step-by-Step Guide

Overview

When visitors open a directory without specifying a file, the server uses the first matching filename as the index (e.g., index.html). This interface lets you control which filenames the server looks for and prioritize their order.

Quick summary

Looking for affordable server licenses? SharedLicense offers cPanel, DirectAdmin, LiteSpeed, CloudLinux, and Windows licenses at wholesale prices with instant delivery.

Browse licenses →

Once saved, the system updates your Apache configuration file (typically /usr/local/apache/conf/httpd.conf) with a directive like:

DirectoryIndex index.php

Add a New Filename

    1. Click the Add button.
    2. Enter the filename you want Apache to recognize (e.g., index.custom).
    3. Click OK, then Save.
    4. Select Rebuild Configuration and Restart Apache to apply the change.

You can also restart Apache manually via command line—for example:

Need the best price on server licenses?

Get cPanel, DirectAdmin, LiteSpeed & more with instant delivery and 24/7 support.

Shop Licenses →

/scripts/restartsrv_httpd

Remove a Filename

  1. Select the filename(s) you want to remove.
  2. Click Remove.
  3. Click Save.
  4. Rebuild configuration and restart Apache to implement changes.

Reorder Filename Priority

Filenames at the top of the list have higher priority. To change the order:

  1. Select a filename you want to move.
  2. Click Move Up or Move Down as needed.
  3. Click Save.
  4. Rebuild configuration and restart Apache to apply the new order.

For example, to display index.html first, move it above index.php in the list.

Summary

  • Use this interface to manage which index filenames Apache prioritizes.
  • Add, remove, or reorder filenames easily.
  • Always rebuild configuration and restart Apache to apply changes.

We are a shared license provider; if you need a cPanel shared license at a cheap price, you can buy it from us.


Cheap cPanel License

Share:

¿Listo para ahorrar en licencias de software?

Únete a miles de proveedores de hosting que confían en SharedLicense por sus precios de mayoreo y entrega instantánea.