elegant themes

Canonical URLs to help WordPress duplicate content issue

| February 23, 2009 | 11 Comments

Fancy words aside, a canonical URL is Google’s way of identifying a “preferred” URL for your posts to avoid duplicate content. Duplicate content is generally defined as “separate web pages with substantially the same content, which may attract a penalty from search engines.”

WordPress is often criticized for having duplicate content since new posts appear on many pages including category pages, archive pages, feeds, and trackbacks.  While this helps visitors find the content they are looking for, it confuses search engines, forcing them to “choose” which URL to serve in search results.

And so… Google (Yahoo and Microsoft too)  recently came out with a new link tag to help with the duplicate content issue which can be added to the <head> section of the duplicate content URLs.

<link rel=”canonical” href=”http://www.example.com/product.php?item=swedish-fish” />

But honestly, who can be bothered to go into the <head> for every post. Luckily, there are 2 WordPress plugins that are here to help:

Yoast adds rel=”canonical” links to your blogs <head> section

SEO No duplicate – This simple plugin helps you easily tell the search engine bots the preferred version of a page by specifying the canonical properly within your head tag.

For more information, read the official announcement from Google.

Tags: , , ,

Category: News & Views

About Rebecca Markowitz: Rebecca Markowitz has built over 50 WordPress sites for clients as Web Project Manager and WordPress specialist at illuminea. illuminea is a Jerusalem-based boutique web agency. WPGarage shows my dedicated relationship with WordPress over the years - full of love, laughs, tears, growth and strong drinks. L'chaim! View author profile.

Comments (11)

Trackback URL | Comments RSS Feed

  1. Ryan says:

    These sorts of things should be controlled by the theme, not a plugin. In reality I’m not sure it’s necessary though. Matt Cutt’s (Google spokesperson) has already said that he doesn’t believe WordPress blogs need to worry about duplicate content issues. Google is smart enough to determine which page is the most appropriate and behaves accordingly.

    The canonical link is intended for situations in which you don’t believe Google would be able to figure out the most appropriate link for itself. Personally I’m happy to trust Google with that issue.

  2. george says:

    Well actually no Ryan you are wrong…

    For example at my blog i have a post that is giving away seo tips…Google ranks the tag of my post higher than the actual post :P Considering this i don’t think that the machine os so smart…

    Canonical urls are pretty damn useful for wordpress…

  3. Ryan says:

    @George – But surely a tag page would not be treated as having a canonical URL with a post?

  4. Fortuente says:

    Alas I have experienced first-hand issues with WordPress and duplicate penalization in Google, at least. Even if Google has already or improves in the future their search to mitigate this behavior I will likely always be overly paranoid about it.

    I myself always prefer the theme route to the plug-in route where it is possible, however. Off the top of my head, I suppose the following would work in header.php?

    <link rel=”canonical” href=”<?php the_permalink() ?>” />

    Or would it require more? I guess I have something to play around with now when I get the time.

  5. Sudipta says:

    Now I am confused!  
    It is really dumb of Google not to be able to identify the duplicate content. WordPress is a popular vehicle, google should be smart about this.

  6. Looks good but I wonder how it helps when you have identical content on your home page as a teaser paragraph then the same content on the blog page.

    Imagine a blog about songs – the home page has the first verse of 10 songs and each song has its own page – how does google decide if the home page or the song page is the right place ?

  7. ovidiu says:

    fortunately I recently switched to the hybrid theme and canonical urls are already included :-)

  8. I used to publish my articles, but now I wander should I stop doing this, because the risk of duplicate content penalty. Should I stop publish my articles on article directories?

  9. Just-a-Guest says:

    The issue is not about google penalizing and they always want you to stop worrying about it. Even if they are not directly penalizing you, you definitely should worry about it.

    The real issue is more like this: you have some urls generated by your page about awesome blue widgets.


    Now google chooses the last link to be the main one and only that one gets indexed. Now you miss all the lovely URL structure and keywords in your address and your page ranks poorly compared to what would happen if it chose the first URL.

    And they say, “Don’t worry about it, we will figure it out.” But yes that IS EXACTLY what I’m worried about.

    If google is so fcking smart, as Matt claims, then why is there so much spam in their index these days?

  10. Keith Davis says:

    I’m struggling with this duplicate content business in wordpress. For a static site it’s simple, don’t repeat yourself. But for wordpress you have home page content showing full post, archives, categories… not sure what else!
    I guess the answer is a theme with canonical url’s included as Ovidiu says.
    Thanks for making things a little clearer.

  11. Ben says:

    Anybody know of a plugin that inserts customizable canonicals to category pages?

Leave a Reply

If you want a picture to show with your comment, go get a Gravatar.

More in News & Views (11 of 65 articles)