Search for the Article

Redirect index.html Page to Root Domain - 🏃 301 Moved Permanantly


What is 301 Permanent Redirect

A permanent 301 redirect in your .htaccess file tells the search engines and others that the old link has been replaced by new ones. It's the recommended method for directing your old page traffic from an existing page.It also passes the link value(SEO Term )to new one URL. You can also solve your website multiple version problem by this method.

Setting up a Permanent 301 redirect via .htaccess

First you need to create .htaccess file and copy & paste below code into it. and then upload it to on root directory.

How to Create .htaccess file.


  1. Open NotePad editor.
  2. Copy and Paste the below code into it.
  3. Save it as .htaccess extension. (don't mention file name just saved it with .htaccess extensions) and select "All files" from "Save as type" from dropdown menu..
  4. then Save it. 








RewriteEngine On
RewriteBase /

# redirect html pages to the root domain
RewriteRule ^index\.html$ / [NC,R,L]


This will redirect your http://www.example.com/index.html page to http://www.example.com/ pass the Link juice of backlinks to main domain.