Thursday, May 23, 2013

301 Redirect index.html to domain on Apache server

Search engines treat website with index.html, with non www and with www pages as three different websites. This causes search engines to index three copies of a same webpage which may leads to duplicate content issue. Permanent redirect also called as 301 redirect is the best way to overcome this issue.


following code we use in .htaccess file for 301 redirect on Apache server

Redirecting index.html to www (root)


Options +FollowSymLinks 
RewriteEngine on



RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/

RewriteRule ^(.*)index\.html$ http://www.onlinebusinessindia.com/$1 [R=301,L]

Redirecting index.php to www (root)


Options +FollowSymLinks 
RewriteEngine on


RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

RewriteRule ^index\.php$ http://www.onlinebusinessindia.com/ [R=301,L]



Click here for Information  on Redirecting  non-www to www (root) 

- a well organized authentic experienced SEO/SEM/SMO/PPC including according to present scenario. who is present in Delhi the capital of India.

0 comments:

Post a Comment