Tuesday, 1 July 2014

What is a Redirection?


Redirection is process of forwarding one URL to a different URL. There are three main kinds of redirects online; 301, 302 and meta refresh.

Types of Redirects

  • 301 ('Moved Permanently') - Recommended for SEO
  • 302 ('Found' or 'Moved Temporarily')
  • Meta Refresh

What is a Redirection?
A redirect is a way to send both users and search engines to a different URL than the one they originally requested.

301 Moved Permanently

A 301 Redirect is a permanent redirect which passes between 90-99% of link juice (ranking power) to the redirected page. 301 refers to the HTTP status codes for this type of redirect. In most instances, the 301 redirect is the best method for implementing redirects on a website.
Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com

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]
Please REPLACE domain.com and www.newdomain.com with your actual domain name.

302 Found (HTTP 1.1) / Moved Temporarily (HTTP 1.0)

A 302 Redirect is a temporary redirect and passes 0% of link juice (ranking power) and in most cases should not be used. The Internet runs on a protocol called HyperText Transfer Protocol (HTTP) which dictates how URLs work. It has two major versions, 1.0 and 1.1. In the first version 302 referred to the status code 'Moved Temporarily'. This was changed in version 1.1 to mean 'Found'.

Meta Refresh

Meta refreshes are a type of redirect that is executed on the page level rather than the server level (They are usually slower and not a recommended SEO technique). They are most commonly associated with a 5 second count down with text "If you are not redirected in 5 seconds, click here". Meta refreshes do pass some link juice but are not recommended as an SEO tactic due to usability and the loss of link juice passed.