Home
/
Website Help
/
Other
/
How to have a different default index file?

How to have a different default index file?

By default, SiteGround’s servers are configured to process the following index files:

index.html Index.html index.shtml index.php Index.php index.phtml Index.phtml index.htm Index.htm default.htm Default.htm default.html Default.html home.htm Home.htm

In the above order, first, the web server looks for the file index.html. If it is not present it looks for the next “Index.html” and so on.

To use a different index file, create a file called .htaccess and specify in it:

DirectoryIndex myfile.html

This will cause the web server to look only for myfile.html. If there is no such a file it will list the contents of the directory.

You can create/modify the .htaccess file via FTP, SSH or File Manager (in Site Tools).

Share This Article