Subscribers

Wednesday, April 8, 2009

«Duplicate Title Tag Fix»

For the fellow blog owners out there that use Google Webmaster Tools, have you ever checked for duplicate title tags? You can find it under Diagnostics/Content analysis. If you do have duplicate tags (and I'm betting you do), they will show under Title tag issues.

If you're anything like me, you try your best to avoid duplicate title tags. It is why I use strange title names for a few of my post series (like Caturday, for example). Also, if you're anything like me you'll be shocked and applauded by all the duplicate tags that are still being reported; despite your best efforts.

When you dig down and figure out what is causing the duplicate title tags you'll find they are from things like comment permalinks like this: /2009/02/vince-offer.html?showComment=1239111420000

Some of them were really god-awful like this one: http://www.mastermarf.com/2009/02/vince-offer.html?widgetType=BlogArchive&widgetId=BlogArchive1&action=toggle&dir=close&toggle=YEARLY-1199178000000&toggleopen=MONTHLY-1222848000000

That brings up the exact same page as /2009/02/vince-offer.html, only it has a bunch of unnecessary query tags tacked on. What's worse is, sometimes googlebot will think that the long one is the true page and drop the short (correct) one from the index.

The fix is finally at hand. Google (and the other major search engines) are now supporting what's called canonical links. Basically they tell the search engine spiders where the "real" version of a page is located. They are extremely useful for situations like I described above or where duplicate content is likely to be generated.

Here's the code for your blogger layout so you too, will no longer have this issue. Put it somewhere just before the </head> tag in your html layout:

<link expr:href='data:blog.url' rel='canonical'/>

That will strip all the unnecessary query tags off the url and point the search engine bots to the shortened url so they can index that one. After your pages are re-indexed you won't have duplicate title tag issues from comment permalinks anymore. All the major search engines use and support these canonical links.

I had a couple hundred duplicate title tags, and within a week of putting in the canonical links I'm down to 5. I trust those won't be around much longer, either. It might take longer for your site. For some reason googlebot really likes my site (crawling an average of 183 pages per day).

9 comments:

  1. You're a genius!! I tried figuring it out and "fixing" the problem - only to go from 50 dups to 65!!! Thank you!

    ReplyDelete
  2. @ jen: It hasn't worked out as well as I had hoped. My duplicate title tag count is back up and I don't know why.

    Still, the canonical links can't hurt.

    ReplyDelete
  3. I want to quote your post in my blog. It can?
    And you et an account on Twitter?

    ReplyDelete
  4. Saya sudah menghapus artikel yang duplicat content but, no work

    ReplyDelete
  5. @ Kang Salman: You can log into Google Webmaster Tools and tell it to ignore some of the URL parameters such as "showComment" and that helps remove duplicate pages as well.

    I hope I understood what you were saying!

    ReplyDelete
  6. Wow, from 1 dup to 6, thanks men, your the great...

    ReplyDelete
  7. @ gemz: Derp. This is an older post, and was the best I could try at the time. I think what finally did the trick was when they allowed you to specify in the the Google Webmaster Tools what parameters it can ignore. Like "action" and "showComment".

    Of course, changes take time to see the results. You might also want to make sure that you really don't have any pages with the same title.

    ReplyDelete
  8. Is there any plugin to do this, cause I am using wordpress..

    ReplyDelete
  9. @ thebloggernet: I'd imagine Wordpress does, or it would allow you to add it into the source code. Don't quote me on that, I don't use Wordpress.

    ReplyDelete

Thanks for taking the time to comment.

Note: Only a member of this blog may post a comment.

»» «« »Home«