How to create a 301 redirect?

As described on URL Canonicalization article we published in March, having a unique URL for each webpage is important in improving your "Pagerank". Canonicalization is accomplished by redirecting non-standard web pages to a preferred ("standard") webpage. There are a number of ways to redirect a webpage, but 301 (HTTP/1.1 Status Code, "Moved Permanently") redirect is the search engine-friendly method that passes the PageRank and search engine ranking status from the old to a new page. Here is an example of how 301 redirects can be implemented in a LAMP (Linux/Apache/Mysql/PHP) environment.

URL Canonicalization

One of the first things discussed when beginning an SEO project is URL canonicalization. You may argue that the impact of having multiple URLs resolving to the same page may not have a huge effect on SEO (if you use it consistently internally), but it certainly doesn't hurt to normalize the URL so that only one URL serves a single webpage. Implementation is not too difficult for most webmasters, and there is a piece of evidence that URL canonicalization will have a positive effect on your SEO effort. You may use one form (www or non-www) of Url for all your internal linking, but you cannot guarantee that others will do the same on 3rd-party websites.