Sunday, August 9, 2009

301 Redirection

One of the most effective and Search Engine Friendly method for webpage redirection is 301 redirection . It's not that hard to implement and it should preserve your search engine rankings for that particular page. To change file name or to move it to another location, 301 redirection is the safest way. In SEO, "301" indicates ''Parmanent" redirection. Below are the couple of 301 redirection methods described:

Old domain to New domain Redirection (htaccess redirect):

To redirect all the directories and pages of your old domain to your new domain, create a .htaccess file, which needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed) .

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

www.newdomain.com in the above code must be replaced with your actual domain name.

Redirect to www (htaccess redirect)


To redirect all requests coming in to domain.com to www.domain.com create a .htaccess file with the below code.The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

domain.com and www.newdomain.com in the above code must be replaced with your actual domain name.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

====================================================

There are other redirection methods, but this are the most sensetive redirections in the SEO perpose.


No comments:

Post a Comment