Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Manage the default homepage pages taken into account
This guide concerns the homepage names that you can have on your Web Hosting Infomaniak, and which will be prioritized when a visitor accesses your website via its domain name.
Preamble
- The default homepages on a Web server are the first pages that display when a user accesses a website without specifying a particular file.
- If you simply enter
http://domain.xyz
in your browser's address bar, the web server will look for a default home page to display, for exampleindex.html
,index.php
,index.htm
, or other similar variations.
Homepage priority order
Here are the default loaded pages in order of priority at Infomaniak:
- index.html
- index.htm
- home.html
- home.htm
- default.html
- default.htm
- index.cgi
- index.php
- index.php5
- index.php4
- index.php3
- default.php
- home.php
- welcome.php
In summary:
- If you have 2 pages at the root of your hosting, thanks to the ranking above, you will notice that
index.php
is recognized as a priority overwelcome.php
. - It can also be deduced that if you only have
welcome.php
as a page in the root folder, it will be loaded and function as the homepage. - If you have a page
accueil.html
, it will not work because this name is not on the list. - When you type
www.domaine.xyz
into the browser, onlyindex.php
will automatically display (and to displaywelcome.php
you will need to type the exact page namewww.domaine.xyz/welcome.php
).
Customize the default homepage
To set a different default homepage, add DirectoryIndex
followed by the appropriate pages in the .htaccess
file:
DirectoryIndex accueil.html index.php index.html
This means that the web server will first look for a file named accueil.html
. If it does not find accueil.php
, it will look for index.php
, then index.html
.
Link to this FAQ: