If you don’t want to see the default welcome page then delete index2.html
and create your index file
Make sure your website has a valid index page
If you link directly to a file on your account (e.g. http://example.com/about.html ), then the specific file will be loaded (about.html
in that case). But what happens if you don’t link directly to a file, but to a directory instead (e.g. http://example.com/blog/ or just http://example.com/ )?
In that case, the server will look for a valid “index file”. An index file is typically file with the name index.php
, index.html
, index.htm
or index2.html
. When trying to open a folder, the server will look for one of those files, and open the first one shown here.
If you have set up your website correctly, there should be a file like that directly in the htdocs folder. If not, it will load the index2.html
file, which is the welcome page.
Please note that file names on InfinityFree (and almost all hosting providers) are cAsE sEnSiTiVe, so please make sure the file is not called Index.php
or index.HTML
, as these files will not be loaded.
You can also customize which file is loaded by default using .htaccess rules. By adding a rule like DirectoryIndex home.php index.php index.html
, the server will try a home.php
file before trying the index.php and index.html files. Learn more about how to add custom .htaccess rules .