Question

From Google's recommendations for URL structure:

Sorting parameters. Some large shopping sites provide multiple ways to sort the same items, resulting in a much greater number of URLs. For example:

http://www.example.com/results?search_type=search_videos&search_query=tpb&search_sort=relevance&search_category=25"

When linking from outside, then having URLs differing only by sort parameters is obviously a bad idea: Google will not understand that these links point to the same item, i.e. that the item is popular. Therefore ranking will be lower than it should.

But what's the alternative? Using a fragment identifier (#), and then doing the sorting in JavaScript? What else? Some settings in Webmaster tools?

Was it helpful?

Solution

You could use the link element with rel="canonical" here.

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 <link> element with the attribute rel="canonical" to the <head> 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."

Benefits:

  • you wouldn't need an account at Google Webmaster Tools
  • the setting at GWT might vanish in the future (you can never know)
  • it works for other search engines, too (Yahoo, Bing, Ask, …)

OTHER TIPS

Just found out that indeed with Webmaster tools, it is possible to configure how parameters should be treated, and in particular whether they change page content. For more information, there is an article by Google:

URL parameters

In the end, I assume though, that simply placing sort parameters in a fragment identifier (#) is semantically the best way to tell Google and users that these parameters only change presentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top