How to add html page on root of WordPress

By Huzaifa Ali · June 30, 2014 · WordPress

Originally published June 30, 2014 by Huzaifa Ali. Restored from the eTechy101 archive in November 2026 with light updates.

Ever wondered if you needed a separate html page on root of your WordPress installation? And it becomes difficult to handle WordPress because it takes you to your root domain if you click on Home link or the logo of your site.

Actually this is easy to set up and has two ways to achieve this.

Option 1 – Define a default document

The above code will go in your .htaccess file which is located on root of your domain.

The sequence tells Apache to follow which file first, and the rest accordingly. So I set index.html first and it will always be served when the root domain is accessed in the browser. Your WordPress file can remain index.php as it won’t be picked up when accessing the root domain.

Option 2 – Rewrite index file for WordPress

So for any reason if you cannot have the option 1 work for you, you can use a rewrite method in .htaccess file. Before doing that, you have to rename your WordPress’ index.php file to something else. To show an example, I use index_wp.php. Follow the sample code below.

The above code is pretty easy and self explanatory. We are telling WordPress to use index_wp.php as its default root file for all purposes. WordPress will be using index_wp.php for loading its own pages with all the functions.

I hope the above quick tutorial is useful for you. Please feel free to leave your feedback or improvements in the comments section below.

Looking for a quality hosting service? here are a few I suggest.
BlueHost | HostGator | Media Temple