.index.html to Homepage Redirection

Hi,

I only observed today that http://www.seofreelancing.com & http://www.seofreelancing.com/index.html both lead to my homepage.

Will this addition in my .htaccess file Redirect my index.html to my Homepage. Also is it an SEO Friendly way to do it?

Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.seofreelancing.com/$1 [R=301,L]

Thanks,
Nuk

That should work just fine. As you’re using a 301 redirect, you’re not going to hurt your SEO at all. This tells the search engine spider that the page has moved permanently.

Will this addition in my .htaccess file Redirect my index.html to my Homepage.

Technically index.html in this situation is your home page. It’s just that the same page is accessible by two different addresses because the web server is automatically serving up index.html when no other file is specified.

Thanks Jeff. I added it to the .htaccess and everything seems to work as expected…

Glad to hear it’s working. :slight_smile: