How To Fix Duplicate Content of index.html?

duplicate content of index.html

What exactly is this Duplicate content ?

www.site.com and site.com and www.site.com/ and www.site.com/index.html are actually same thing for you and are just variations of your site, but Google take these as 4 different sources and consider them as duplicate content. Which can result in a Google Penalty.

So How do I fix It?

First of all let me clear you that this is different from forcing non www version of your website to www version of your website. As discussed in Moz On Page optimization

So, this is actually a big risk of duplicate content from search engine point of view. So we have find a solution to this problem by making some changes in .htaccess

RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://www.domain.com/ [R=301,L]

This code tell your web browser and search engine that all requests to index.html should be redirected to “/” (slash only)

Leave a Reply