Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

This question already has an answer here:

There are two pages in my website with the same content; only the URL's are different: www.websitename.com and www.websitename.com/default.html. Someone suggested that I should add canonical tags to avoid them being considered as duplicate content.

Where should I add canonical tags and why?

share|improve this question

marked as duplicate by John Conde Jun 26 '13 at 11:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
See this: Google Webmaster Tools: Canonical links –  dan Jun 26 '13 at 5:47

1 Answer 1

What is a canonical page?

A canonical page is the preferred version of a set of pages with highly similar content. Why specify a canonical page?

It's common for a site to have several pages listing the same set of products. For example, one page might display products sorted in alphabetical order, while other pages display the same products listed by price or by rating. For example:

http://www.example.com/product.php?item=swedish-fish&trackingid=1234567&sort=alpha&sessionid=5678asfasdfasfd

http://www.example.com/product.php?item=swedish-fish&trackingid=1234567&sort=price&sessionid=5678asfasdfasfd

If Google knows that these pages have the same content, we may index only one version for our search results. Our algorithms select the page we think best answers the user's query. Now, however, users can specify a canonical page to search engines by adding a element with the attribute rel="canonical" to the section of the non-canonical version of the page. Adding this link and attribute lets site owners identify sets of identical content and suggest to Google: "Of all these pages with identical content, this page is the most useful. Please prioritize it in search results."

How do I specify a canonical URL?

You can specify a canonical URL in two ways:

1.Add a rel="canonical" link to the section of the non-canonical version of each HTML page.

To specify a canonical link to the page http://www.example.com/product.php?item=swedish-fish, create a element as follows:

Copy this link into the section of all non-canonical versions of the page, such as http://www.example.com/product.php?item=swedish-fish&sort=price.

If you publish content on both http://www.example.com/product.php?item=swedish-fish and https://www.example.com/product.php?item=swedish-fish, you can specify the canonical version of the page. Create the element:

Add this link to the section of https://www.example.com/product.php?item=swedish-fish.

2.Indicate the canonical version of a URL by responding with the Link rel="canonical" HTTP header. Adding rel="canonical" to the head section of a page is useful for HTML content, but it can't be used for PDFs and other file types indexed by Google Web Search. In these cases you can indicate a canonical URL by responding with the Link rel="canonical" HTTP header, like this (note that to use this option, you'll need to be able to configure your server):

Link: http://www.example.com/downloads/white-paper.pdf; rel="canonical"

Google currently supports these link header elements for Web Search only.

Source: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394

share|improve this answer
    
Thank you for answer. But My question is where to add canonical tag in my website? in default page or home page??? –  sankalp Jun 26 '13 at 10:35
    
You have to add canonical tag in all the duplicate pages.. Don't add it in home page. If you have 5 pages with same content and you need Google to consider only one page means add the canonical tag is all the 4 duplicate pages. So that Google consider the real page and neglect other 4 pages. –  Sathiya Kumar Jun 26 '13 at 10:40
2  
@JohnSanjay Just copying verbatim from a source, already sited above, isn't very helpful. You should use your own words, and blockquote copied text to attribute it to the source. (No downvote from me however) –  dan Jun 26 '13 at 13:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.