views:

402

answers:

1

Hi all,

I am using JBoss Seam on a Jetty web server and am having some issues with the query parameters breaking links when they appear in google searches.

The first parameter is one JBoss Seam uses to track conversations, cid or conversationId. This is a minor issue as Google is complaining I am submitting different urls with the same information.

Secondly, would it make sense to publish/remove urls via the Google Webmaster API instead of publishing/removing via the sitemap?

Walter

A: 

Hey Walter, I would recommend that you use the rel=canonical tag to tell the search engines to ignore certain parameters in your URL strings. The canonical tag is a common standard that Google, Yahoo and Microsoft have committed to supporting.

For example, if JBoss is creating URLs that look like this: mysite.com?cid=FOO&conversationId=BAR, then you can create a canonical tag in the section of your website like this:

<html>
   <head>
      <link rel="canonical" href="http://mysite.com" />
   </head>
</html>

The search engines will use this information to normalize the URLs on your website to the canonical (or shortest & most authoritative) version. Specifically, they will treat this as a 301 redirect from the URL of the HTTP request to the URL specified in the canonical tag (as long as you haven't done anything silly, like make it an infinite loop, or pointed to a URL that doesn't exist).

While the canonical tag is pretty fricken cool, it is only a 90% solution, in that you can still run into issues with metrics tracking with all the extra parameters on your website. The best solution would be to update your infrastructure to trap these tracking parameters, create a cookie, and then use a 301 redirect to redirect the URL to the canonical version. However, this can be a prohibitive amount of work for that extra 10% gain, so many people prefer to start with the canonical tag.

As for your second question, generally you don't want to remove these URLs from Google if people are linking to them. By using the canonical tag, you achieve the same goal, but don't loose any value of the inbound links to your website.

For more information about the canonical tag, and the specific issues & solutions, check out this article I wrote on it here: http://janeandrobot.com/library/url-referrer-tracking.

Nathan Buggia
Nathan,Thanks for your response, I'll give that a try. JBoss Seam creates those parameters dynamically for tracking conversations or flows. I'll added those parameters to google webmaster ... but they still show up. This looks like the best all-around solution since it should help *fix* the problem with other search engines as well.