Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Set DirectoryIndex Priority in Webuzo

DirectoryIndex decides which file opens first when someone visits a folder. This guide shows how to change the order in Webuzo.

Webuzo2 min read8 steps2 screenshots

What is DirectoryIndex?

When you open example.com, you do not type a file name. The server picks a file for you. It looks for names in a list, in order. The first one it finds is shown. This list is called DirectoryIndex.

A common list looks like this: index.html, index.php, index.htm. If both index.html and index.php exist, the first name in the list wins. This is the priority.

Why change it?

  • Your site shows an old page because an old index.html is first.
  • You want index.php to load first for a PHP app.
  • You use a custom file name for the home page.

This guide may need root access in some cases. Root access means full control of the server. VPS and dedicated customers have it.

Steps in Webuzo

  1. Log in to the Webuzo admin panel.
    Screenshot: Log in to the Webuzo admin panel.
  2. Open the settings area for Apache. This is the web server program. Look for Apache Settings or a similar item under server settings.
  3. Find the DirectoryIndex option or a list of index files.
  4. Edit the list. Put the file you want first at the beginning.
  5. Separate names with a space. For example: index.php index.html index.htm
  6. Click Save.
  7. Restart Apache if the panel asks you to. A restart makes the server reload its settings.
  8. Visit your site and check the right page appears.

Using .htaccess instead

You can set the order for one site only. Open your .htaccess file and add this line.

DirectoryIndex index.php index.html

This tells the server to try index.php first, then index.html.

Tip: Back up your config or .htaccess first. A mistake can take your site down. Menu names can differ between Webuzo versions.

Quick recap

  • DirectoryIndex is a list of home page file names.
    Screenshot: DirectoryIndex is a list of home page file names.
  • The first file found in the list is shown.
  • Change the order in Webuzo Apache settings.
  • Or use a DirectoryIndex line in .htaccess.