Canonicalization - Post ID 125781

User 1752831 Photo


Registered User
43 posts

Regarding the following (from Google Webmaster Central):


How do I do this within cc Shopping cart creator?
Add this extra information to the <head> section of non-canonical URLs:
<link rel="canonical" href="http://www.example.com/dresses/greendress.html">

I have duplicate product pages and Google is not liking it.
So I want the cc shopping cart pages to be non-canonical urls.

Here's the link to the Google page regarding this:
http://www.google.com/support/webmasters/bin/answer.py?answer=139066

Here's the content from the Google page regarding this:
Specify the canonical link for each version of the page

If you want http://www.example.com/dresses/greendress.html to be the canonical URL for your listing, you can indicate this to search engines by adding a <link> element with the attribute rel="canonical" to the <head> section of the non-canonical pages. To do this, create a link as follows:

<link rel="canonical" href="http://www.example.com/dresses/greendress.html">

Add this extra information to the <head> section of non-canonical URLs.

http://example.com/dresses/greendress.html?gclid=ABCD
http://example.com/dresses/index.php?pr … sionid=123

This tells Google that these URLs all refer to the canonical page at http://www.example.com/dresses/greendress.html. Note: We recommend using a link with the attribute rel="canonical" to indicate your preferred URL, but we can't guarantee to follow that preference in all cases. Also, you should use this method only for URLs on the same domain as the canonical version.


Any enlightenment appreciated.
Thanks
User 364143 Photo


Guest
5,410 posts

You would add any code that you want in the head section of the cart to this file.

\ccdata\php\common.inc.php
CoffeeCup... Yeah, they are the best!
User 1752831 Photo


Registered User
43 posts

Thanks The Joker,
I will give that a try.
Appreciate the quick response too.:cool:
User 1752831 Photo


Registered User
43 posts

Well, a problem with adding <link rel="canonical...."> to the common.inc.php file.

Would have to add each and every cc product page like the following, for example:

<link rel="canonical" ...../shop/viewitem.php?groupid=3&productid=3">
<link rel="canonical" ...../shop/viewitem.php?groupid=4&productid=16">
etc.

I don't think that will work in the common.inc.php file Would it?
(I wouldn't know how to add all of product pages different <link rel="canonical" ... "> if it would work either.)

Any further enlightenment appreciated.
Keeping in mind I do not know how to code PHP.
User 364143 Photo


Guest
5,410 posts

I see what you mean. I don't believe there is an easy method to add tags to the heading section of specific product pages.
CoffeeCup... Yeah, they are the best!
User 1752831 Photo


Registered User
43 posts

Well, okay The Joker.
Thanks anyway.
Will figure out another way to achieve the same result I guess.
"Where there's a will there's a way (I think, I hope):rolleyes:
User 1752831 Photo


Registered User
43 posts

Perhaps this is the way to go:

From Google Webmaster Central:

Many sites make the same content available via different URLs. Say you have a clothing site and one of your top items is a green dress. The product page for the dress may be accessible through several different URLs, especially if you use session IDs or other parameters:

http://www.example.com/products/women/dresses/green.htm
http://www.example.com/products/women/d … p;cruel=no
http://example.com/shop/index.php?produ … ;affid=431
http://example.com/dresses/cocktail?gclid=X20382

If Google knows that these pages contain the same content, we may index only one version for our search results.
However, you can specify up to 15 parameters you'd like Google to ignore (Google treats these requests as suggestions rather than directives).
Ignoring certain parameters can reduce duplicate content in Google's index, and make your site more crawlable.
For example, if you specify that the parameter sessionid should be ignored, Google will consider http://www.example.com/dresses/green.ht … nid=273749 to be the same as http://www.example.com/dresses/green.htm.


I am trying this with groupid and productid
And did the following:

To specify how you would like Google to handle parameters:

1. On the Webmaster Tools Dashboard, click the site you want.
2. Under Site Configuration, click Settings.
3. In the Parameter handling section, click Adjust parameter settings.
4. For each parameter, select the option you want. (If no parameters are listed, Google did not find any when crawling your site. You can still add parameters yourself.)


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.