Duplicate content on website have become more deleterious since Google Panda updates. It is so important that I guess no website owner can afford to overlook. Google Panda was designed primarily to target low value content on websites, Scraped content, and to reduce duplicate content that results in spam based search result. Duplicate content can also arise from dynamically generated pages.
301 Redirect and Canonical tag are most important weapon to resolve duplicate content issue for every web developer but unfortunately many web developers do not have a clear understanding of what they are, or how, or when each method should be employed.
301 redirect is mostly use when one change URL of website and want Old URL to be live in search result to avoid 404 not found error. Also it is use when one move domain to new webhost. Redirect tells search engine that the website has been moved but it helps in preserving ranking.
Most important use of 301 is to let search engine know the preferred URL of your website domain.
Example: http://www.example.com and http://example.com both are same URL but search engines treat them as different URL. The 301 redirect allows you to specify the “proper” domain and retain the strength of the websites ranking so that it is not split between the two.
Canonical tag is basically used to avoid duplicate content issue on websites. Before canonical issue came into existence duplicate content was simply ignored which has negative impact on SERPs and it got very difficult to get quality and relevant results while performing web searches.
Canonical tag is used in head section of HTML document. Canonical tag is simple one line code which is treated same as 301 redirect. It ensures that the page rank and back links flow to the proper URL and not split between two domains with www and without www.
<link rel=”canonical” href=”http://www.example.com/product.php?item=abcd” />
Above tag tells search engine that the correct version of “abcd” page is located at the www version and not the non www version.