noscript-img
HomeAboutLinux NewsResourcesPrivacy
My Computer Tips Home

Set index.html as your default landing page using .htaccess

ID: 376

Category: HTML

Added: 8th of April 2024

Updated On: Tutorial updated and rechecked on 11th of December 2025

Views: 1,150

Sometimes you might want to create a static index.html landing page for your website. From experience it is usually set as index.php

So that visitors land on index.html instead of index.php you need to add the DirectoryIndex directive to your .htaccess file

The .htaccess file can be found in the root directory on your webspace.

In your .htaccess file, simply add the following code below and save the file

DirectoryIndex index.html index.php

FacebookSitemap Valid CSS!