Twitist Forums
Difference between 301 re-direct and cononicalisation? - Printable Version

+- Twitist Forums (http://twitist.com)
+-- Forum: General Social Media & Marketing Forums (/forum-8.html)
+--- Forum: SEO Search Engine Optimization (/forum-30.html)
+--- Thread: Difference between 301 re-direct and cononicalisation? (/thread-130521.html)



Difference between 301 re-direct and cononicalisation? - sunny - 04-08-2014 06:46 PM




- Venu - 04-08-2014 06:49 PM

301 redirect:
301 redirect is Move the old url permanently to another URL.

For example http://www.cricinfo.com header.

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.espncricinfo.com");
?>

Cononicalization:
Google has mistaken and seems, given websites are three individual webpages.
http://www.website.com
http://website.com
http://www.website.com/index.php
These three urls are same and have same content, Google hate duplicate content. Consequently, the google mistakenly penalize the website. To prevent this problem most of the webmaster add given script in the .htaccess.

RewriteEngine on
RewriteCond %(HTTP_HOST) ^website.com
RewriteRule (.*) http://www.website.com/$1 [R=301,L]
RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.php\ HTTP/
RewriteRule (.*) index\.php$ /$1 [R=301,L]

In the canonicalization, we use 301 rule.