homepage Welcome to WebmasterWorld Guest from 54.227.11.45
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
What is the correct use of rel=hreflang and rel=canonical?
Mishaelo




msg:4548345
 12:55 pm on Feb 24, 2013 (gmt 0)

Hi,

We have a site in a different languages.

Structure is set as follows:

example.com/en/page.html
example.com/es/page.html
example.com/fr/page.html

Basically only the template is translated and the content is always in English.

each page.html also has versions with parameters which is why I want to use canonical as well

I was thinking of doing the following:
have on each page all the hreflang tags for the different languages and canonical to the same language so for example:

example.com/es/page.html
will have:
<link rel=”alternate” hreflang=”es” href=“example.com/en/page.html">
<link rel=”alternate” hreflang=”es” href=“example.com/es/page.html">
<link rel=”alternate” hreflang=”fr” href=“example.com/fr/page.html">

<link rel="canonical" href="“example.com/es/page.html">


Does this make sense?

Thanks

 

TheOptimizationIdiot




msg:4548387
 6:06 pm on Feb 24, 2013 (gmt 0)

If I understand the information about the relationships you're using right (which is always debatable lol) I would think you would want to point the canonical to "the first choice" of the languages to identify it as "the origination of the information" or "best default choice" and leave the others as alternates only.

A canonical page is the preferred version of a set of pages with highly similar content.

[support.google.com...]

menntarra 34




msg:4548499
 1:47 am on Feb 25, 2013 (gmt 0)

Good question, i have a site, where i use hreflang, but i don't use rel="canonical". So please others confirm if use it or not. My reason is that i think the hreflang tells google that it is indeed alternate, and so google shows these different language results for people in different countries. I think if i include the <link rel="canonical" page, it makes google remove these other different language result, which is not good.

aakk9999




msg:4548502
 2:05 am on Feb 25, 2013 (gmt 0)

I think if i include the <link rel="canonical" page, it makes google remove these other different language result, which is not good.

This is correct. If a page is genuinly translated, it has a different content and therefore it should not have a canonical link element pointing to URL for English language.

In the OP case, he has only template translated, but the content is in English on URLs he/she uses for other languages. In his case, rel alternate is wasted (as the content is the same) and the canonical is the right choice. Once the content of the other language page gets translated, OP may remove canonical and put back rel alternate.
Alternatively, OP could just stop the other language URLs that show English content being crawled via robots.txt and in this way stop the duplicate content.

Mishaelo




msg:4548548
 6:07 am on Feb 25, 2013 (gmt 0)

In the OP case, he has only template translated, but the content is in English on URLs he/she uses for other languages. In his case, rel alternate is wasted (as the content is the same) and the canonical is the right choice.
I don't think the above is correct, taken from the google support page:
Some example scenarios where rel="alternate" hreflang="x" is recommended:

You translate only the template of your page, such as the navigation and footer, and keep the main content in a single language. This is common on pages that feature user-generated content, like a forum post.

source: [support.google.com...]

So I believe rel alternate is needed here, still not sure about the canonical though

Alternatively, OP could just stop the other language URLs that show English content being crawled via robots.txt and in this way stop the duplicate content.
That is not something I want to do, as I want Google to display the other languages to people coming from non US location (it's the reason those pages were created)

I would think you would want to point the canonical to "the first choice" of the languages to identify it as "the origination of the information" or "best default choice" and leave the others as alternates only.
I need canonical on each language as I have affiliate links with parameters coming and would like to point to the "base" form of the page.


Do you believe having a canonical from each page to itself (fr will have a canonical to fr, es canonical to es etc) will cause duplication issues? I was under the impression that the hreflang will signal Google this is not duplication but just a page in a different language (as each page has alternates to all other languages)

TheOptimizationIdiot




msg:4548554
 7:49 am on Feb 25, 2013 (gmt 0)

Do you believe having a canonical from each page to itself (fr will have a canonical to fr, es canonical to es etc) will cause duplication issues?

I doubt it will cause duplicate issues.

Once you say 'Page B is an alternate for Page A' and 'Page C is an alternate for Page A' you're also saying 'Page C is an alternate for Page B'. You don't even need to have a "rel=alternate" on every page.

This relationship is transitive — that is, if a document links to two other documents with the link type "alternate", then, in addition to implying that those documents are alternative representations of the first document, it is also implying that those two documents are alternative representations of each other.

Source: [w3.org...] http://www.w3.org/html/wg/drafts/html/master/links.html#rel-alternate (I 'broke the link' in this one to keep the anchor intact for a copy/paste.)

And here's where I start to feel like my username (lol).

The question you're asking really gets into the "micro handling" of documents Google (and others) have in place for different variations of markup combinations.

My gut tells me if they're all "alternates" and the use of rel=canonical is to identify "the best default choice" (preferred version), using rel=canonical on all 3 will likely cause it to be ignored in relation to the 3 versions you have, cause you're essentially saying each of 3 alternates (near duplicates) are the preferred version of the same page/content and that really doesn't make complete sense (especially from an algorithmic perspective in my opinion anyway), but it may not be ignored in a situation where someone else duplicates your content.

I really don't know the answer though, cause it really comes down to how they have decided to handle that type of situation but the above is my "best gut guess" on what they'll do with it algorithmically.

Another way of saying what I think will happen:
It will be ignored on your site since you're saying each of the 3 alternates (near duplicates) are the preferred version of the page. (Doesn't quite make sense, cause it doesn't seem like they really can all be the preferred version at the same time when they're alternates.)

It may be helpful if your pages are duplicated by someone else, cause then you're saying the preferred version of the exact duplicate of any of your original language variation pages is the original language variation page you created. (That makes way more sense to me, so I think it's more likely they will take the canonical into account in that situation.)

TheOptimizationIdiot




msg:4548796
 8:03 pm on Feb 25, 2013 (gmt 0)

This is really an interesting question to me so I put some more thought into what I would do and I'm not 100% decided but I've narrowed down to 2 options.

I need canonical on each language as I have affiliate links with parameters coming and would like to point to the "base" form of the page.

Option 1:
A.) Run the canonical the way it's described to be used by Google, meaning "point it" to the "preferred version" of the 3 language variations.

B.) Run a canonical on the language variations with the extra affiliate URL parameters that points to the "preferred version" of the page without the affiliate parameters.

Example of What I'm Saying Above:
A.) /es/page.php == rel="canonical" href="/en/page.php"
B.) /es/page.php?affID=some-stuff == rel="canonical" href="/es/page.php"

Option 2:
A.) Run the canonical the way it's described to be used by Google, meaning "point it" to the "preferred version" of the 3 language variations. (Same as "A" Above)

B.) Set the additional parameters for affiliate tracking to be ignored in WMT.

In either case if I was going to use the canonical I would use it as instructed then figure out "step 2" to get the affiliate extras "not counted" or "not preferred" as the version to display in the results.

TheOptimizationIdiot




msg:4548841
 10:58 pm on Feb 25, 2013 (gmt 0)

Ok final answer (so far): Cover all the bases.

A.) Run the alternate on the language variations like Google indicates.

/en/page.html ==
rel=”alternate” hreflang=”es” href=“example.com/es/page.html"
rel=”alternate” hreflang=”fr” href=“example.com/fr/page.html"

B.) Run the canonical the way it's described to be used by Google, meaning "point it" to the "preferred version" of the 3 language variations.

/es/page.html == rel="canonical" href="/en/page.html"

C.) Run a canonical on the language variations with the extra affiliate URL parameters that points to the "preferred version" of the page without the affiliate parameters.

/es/page.html?affID=some-stuff == rel="canonical" href="/es/page.html"

D.) Noindex anything with an affiliate parameter.
/es/page.html?affID=some-stuff == meta name="robots" content="noindex"

E.) Set the additional affiliate parameters to be ignored in WTM.

I don't think there's a much more clear way of saying: There are 3 alternate versions of a page. The preferred version of the alternates is "the language of your preferred version". These other pages with the affiliate parameters are not for ranking purposes. They're for something else so only index and rank the version of the page without the parameters.

Mishaelo




msg:4548904
 7:27 am on Feb 26, 2013 (gmt 0)

Feel my head starting to spin from this.. ;-)

@TheOptimizationIdiot -
So basically you're saying that if the page is presented on its base form (no params) - set a canonical to the preferred language but if the page is presented with params - set the canonical to that specific language base form?

hmm, sounds weird to me as the page with / without params is basically the same page but each time I set canonical to a different page?

TheOptimizationIdiot




msg:4548988
 3:09 pm on Feb 26, 2013 (gmt 0)

Well, I have no clue which video it is (I think it's a couple) when MC talks about adding rel=canonical to his school webpage he said he's go there and put rel=canonical on it in place of a 301 redirect. He didn't say he'd "just put it on his blog" and that would take care of it.

So, when I think about using it in your situation like he described I would pick the two alternate versions I would 301 if I could (but can't cause then the alternate is useless) and put rel=canonical on those to point to the preferred version of that set of alternates.

Then I'd do the same thing with the set of exact duplicates created by the affiliate parameters for the language variations, meaning I'd put rel=canonical on the page(s) with the parameters in the URL pointing to the version without the parameters, cause I can't use a 301 again or the pages with the parameters are useless.

I think it makes way more sense that way actually, cause anyone can "slap rel=canonical on any page" and try to say "this is the preferred version" but there's no way in my opinion that would "carry as much weight" as Page B pointing to Page A as the canonical version and basically saying "show that one instead of this one" like a 301 would if it could be used.

Mishaelo




msg:4549757
 8:07 am on Feb 28, 2013 (gmt 0)

Still confused, if these are the pages I have:

example.com/en/page.html
example.com/en/page.html?param=value
example.com/es/page.html
example.com/es/page.html?param=value
example.com/fr/page.html
example.com/fr/page.html?param=value

where example.com/en/page.html is the main page.

Which alternate / canonical should I put on each page?

TheOptimizationIdiot




msg:4549856
 2:49 pm on Feb 28, 2013 (gmt 0)

oops doubled

[edited by: TheOptimizationIdiot at 2:56 pm (utc) on Feb 28, 2013]

TheOptimizationIdiot




msg:4549857
 2:50 pm on Feb 28, 2013 (gmt 0)

I would:
example.com/en/page.html
<link rel="alternate" hreflang=”es” href="example.com/es/page.html">
<link rel="alternate" hreflang=”fr” href="example.com/fr/page.html">

And on example.com/es/page.html & example.com/fr/page.html
<link rel="canonical" href="example.com/en/page.html">

And on example.com/en/page.html?param=value
<link rel="canonical" href="example.com/en/page.html">

And on example.com/es/page.html?param=value
<link rel="canonical" href="example.com/es/page.html">

And on example.com/fr/page.html?param=value
<link rel="canonical" href="example.com/fr/page.html">

Basically, I'd put the canonical where the 301 would be if I could use one, because that's how it's described to be used. The 301 wouldn't go "on the page being redirected to" the 301 would go "on the page" being redirected and "point to" the page being redirected to, so that's how I'd use the canonical.

Mishaelo




msg:4553084
 3:09 pm on Mar 10, 2013 (gmt 0)

@TheOptimizationIdiot

Thanks for your help, but I decided to go with my original plan of alternate tag between languages and canonical to the base language page as it seems the most logical way to go. (for me at least)

Hopefully google won't consider this as duplicate content due to the alternate tag.

I'll post here if I see anything happening on Google if someone else happens to have the same situation.

TheOptimizationIdiot




msg:4553109
 3:45 pm on Mar 10, 2013 (gmt 0)

Hopefully google won't consider this as duplicate content due to the alternate tag.

No problem on the explaining. They won't consider it a duplicate in a "bad duplicate" way at least with the alternate on there, but they'll likely just ignore the canonical and decide what the canonical should be on their own like they would if it wasn't there cause you really can't have 3 alternates all be the canonical version of the page which is what you're saying by setting each one as the canonical of itself.

TheOptimizationIdiot




msg:4553114
 4:28 pm on Mar 10, 2013 (gmt 0)

[youtube.com...]

Check out how many times he says "point to" the canonical from the "old URL" and things along those lines. Pointing a canonical to itself "works" meaning even though it's an "infinite loop" there's not an issue with it, but it doesn't say "what should be canonicalized to that URL either".

[youtube.com...]

Who knows, maybe it'll work, but I think calling the all 3 alternates and calling each the canonical version will most likely cause the canonical to be ignored.

Mishaelo




msg:4553943
 3:09 pm on Mar 12, 2013 (gmt 0)

The first vid is from 2009, way before hreflang was introduced.

I hope that the crawler is smart enough to combine and understand the relations between canonical and hreflang

TheOptimizationIdiot




msg:4553948
 3:23 pm on Mar 12, 2013 (gmt 0)

What I'm saying is you're not understanding the <link rel=canonical> is designed to work by Pointing To the canonical page From the non-canonical page. Not Pointing To the canonical page From the canonical page.

That's how it was introduced. That's still how it's intended to be used. That has not changed since the introduction of the element.

It's designed to be used in a case where a 301 can't.

You're saying you're going to point to the canonical page from what you want to be considered the canonical page.

That's not how it's designed to work. It does not replace a 301 that way. A 301 goes From the old location (non-canonical) To the new location (canonical). To not be ignored and do what you want the canonical element should point From the non-canonical page To the canonical page.

You're saying all 3 pages you're calling alternates are the canonical version of the page the way you're doing it.

It's about the same as doing this:
On example.com/es/page.html
<link rel="canonical" href="example.com/en/page.html">

On example.com/en/page.html
<link rel="canonical" href="example.com/fr/page.html">

On example.com/fr/page.html
<link rel="canonical" href="example.com/es/page.html">

There's no way they could not simply ignore it.

The way you're wanting to do it actually makes more sense if they're not alternates, but anyway, I've tried my best to explain it.

There's not much else I can say, except good luck and I do recommend adding all 3 alternates to an xml sitemap but not any of the pages with parameters, which is Google specific, but can help them "get the right (canonical) version" of duplicate pages indexed.

TheOptimizationIdiot




msg:4553957
 4:12 pm on Mar 12, 2013 (gmt 0)

One more try at explaining even just for future readers.

When you call 3 pages alternates you're saying they're essentially the same with some small differences or basically for the sake of explaining you're saying they're equals of each other.

So when you say "alternate" you're saying this:
page a = page b = page c

Now on your pages you're saying each is an "alternate" and each is the "canonical" version.

So you're saying this:
page a = page b = page c
page a is the canonical

page b = page a = page c
page b is the canonical

page c = page a = page b
page c is the canonical

As a search engine how can you figure out from the tagging which is the preferred version (canonical) of the page (a or b or c)?

kylegolem




msg:4554043
 8:13 pm on Mar 12, 2013 (gmt 0)

I have a bit of a question:

I'm working on a site that has both an English Version and a Spanish Version. I've looked into canonicalizing each URL to send juice back to the original but I don't think this is the best solution; Especially for the Spanish speaking users.

I've also explored using 'hreflang' parameters (via the sitemap) to specify which Spanish page relates to the English page.

ex. http://example.com/hello
http://example.com/hola

Doing the sitemap method resulted in 127 URLs being submitted and only 3 of those URLs being indexed in Webmaster Tools. Would it be more effective to do this at the page level?

What I'm wondering is which of these methods is most effective for what I'm trying to accomplish? I really need to get this sorted. Can't seem to find a distinct answer anywhere!

Thanks.
.

[edited by: Robert_Charlton at 10:27 pm (utc) on Mar 13, 2013]
[edit reason] changed example to example.com to disabled auto-linking [/edit]

TheOptimizationIdiot




msg:4554102
 10:07 pm on Mar 12, 2013 (gmt 0)

Due to the "debate" I'm running tests on this right now, not with a lang. variation, but with page variations declared as alternates and canonicals.

I'll do my best to remember to post results of the testing here. I don't "do" different languages on the main site I'm working on, but do "do" very similar alternate pages and I'm running some with a canonical and some without, so like I said, I'll do my best to post results and hopefully at least be able to "give people a direction" to look for an answer to the question.

Dymero




msg:4554112
 10:34 pm on Mar 12, 2013 (gmt 0)

What I'm saying is you're not understanding the <link rel=canonical> is designed to work by Pointing To the canonical page From the non-canonical page. Not Pointing To the canonical page From the canonical page.


I use canonical tags on the canonical page. That way it covers all current and future parameters you might use in a URL (edit: except if the parameter is actually being used to display different content entirely). It works fine.

Also, using the canonical tag is one of the recommended methods for implementing the +1 button, if you ever plan to use it.

TheOptimizationIdiot




msg:4554117
 10:39 pm on Mar 12, 2013 (gmt 0)

That way it covers all current and future parameters you might use in a URL

Yes, because the canonical on the other pages (with parameters) "points to" the actual canonical URL. There's a big difference between "pointing new URLs or URLs with parameters to the canonical" and simply pointing canonicals on alternate versions of a page to themselves, in my opinion and experience so far.

Mishaelo




msg:4554291
 1:00 pm on Mar 13, 2013 (gmt 0)

@TheOptimizationIdiot
I'm using alternate but with the hreflang tag which tells google these are similar pages with a different language.

That part is for G to display the correct language page depending the G domain search was made.

The canonical part is simply to override the parameters issues so when displaying a page on G in spanish it won't show the page with parameters and won't cause the pages to be considered duplicates (pages on the same languages)

I guess we just see this in a different way.

So who has the Matt Cutts hookup to settle this? :)

TheOptimizationIdiot




msg:4554330
 2:36 pm on Mar 13, 2013 (gmt 0)

The plot thickens.

When I have alternate alone up to 4 alternates are showing in the SERPs with each of the alternates showing for the "more specific" keywords it should show for.

On some I have alternates and canonicals only the canonical is showing but on others the alternates are showing like they do if I don't have a canonical.

Might be the best way to go here is not to use canonical on the alternates at all and only put it on the URLs with parameters, but I'm not sure on why some of the pages with alternates and canonicals are showing different alternates in the SERPs while some others are showing only the canonical page.

Percentage difference between the alternate and canonical maybe?

Mishaelo




msg:4554618
 7:57 am on Mar 14, 2013 (gmt 0)

What type of alternate are you using and what do you mean by:
with each of the alternates showing for the "more specific" keywords it should show for

lucy24




msg:4554621
 8:15 am on Mar 14, 2013 (gmt 0)

You're saying all 3 pages you're calling alternates are the canonical version of the page the way you're doing it.

What happened to the other three? About halfway up this thread we were given this list:

example.com/en/page.html
example.com/en/page.html?param=value
example.com/es/page.html
example.com/es/page.html?param=value
example.com/fr/page.html
example.com/fr/page.html?param=value


So the question seemed to be: How do you convey the message that all parameter-less pages are canonical but, uhm, some are more canonical than others?

TheOptimizationIdiot




msg:4554863
 4:30 pm on Mar 14, 2013 (gmt 0)

What type of alternate are you using and what do you mean by:

Different variations of the same page. As an example, think a business offers multiple types of service and there's only one offering the "main" service, but the same one also offers 3 specific sub-services. There would be 4 pages for the business. One for the main service offered and one for each of the other sub-services that are worded more specifically and linked to from the specific sub-service sections for those who are looking for the sub-service more specifically than the main service.

The 4 separate pages are "slightly different variations" of the same page, or in HTML, "alternate" pages. They're not "exactly duplicates" or a different "sort order" they're more specific presentations of the same information based on the specific service and sub-services offered, so they're "alternate" versions of the page.

How do you convey the message that all parameter-less pages are canonical but, uhm, some are more canonical than others?

That's where I was saying I think declaring the parameterless page as the canonical on the pages with the parameters is the way to go. Or in other words: I would have the canonical element on the pages with the parameters "point to" the version without the parameters as the canonical version of the specific language variation.

We have "rambled" a bit though, so I can see how there would be some confusion.

TheOptimizationIdiot




msg:4559658
 8:01 pm on Mar 29, 2013 (gmt 0)

Not sure if this is the "correct use" as defined by Google or others, but "the best use" I've found after testing in a similar though non-language alternate situation across a fairly large number of pages is to:

1.) Set the language variations as alternates.
(In the testing situation I set the page variations of the same language as alternates.)

2.) Do not set a canonical on any of the 3 language variation pages.

3.) Set the canonical on any page with a parameter(s) to "point to" the location without the parameter(s).

So using the same example as above:
I would:
example.com/en/page.html
<link rel="alternate" hreflang=”es” href="example.com/es/page.html">
<link rel="alternate" hreflang=”fr” href="example.com/fr/page.html">

And on example.com/es/page.html & example.com/fr/page.html
<link rel="canonical" href="example.com/en/page.html">

And on example.com/en/page.html?param=value
<link rel="canonical" href="example.com/en/page.html">

And on example.com/es/page.html?param=value
<link rel="canonical" href="example.com/es/page.html">

And on example.com/fr/page.html?param=value
<link rel="canonical" href="example.com/fr/page.html">

^^^ This is Not what I would do any more.

I would instead:
example.com/en/page.html
<link rel="alternate" hreflang=”es” href="example.com/es/page.html">
<link rel="alternate" hreflang=”fr” href="example.com/fr/page.html">
<Not Set a Canonical>

And on example.com/es/page.html & example.com/fr/page.html
<Not Set a Canonical>

And on example.com/en/page.html?any-param=any-value
<link rel="canonical" href="example.com/en/page.html">

And on example.com/es/page.html?any-param=any-value
<link rel="canonical" href="example.com/es/page.html">

And on example.com/fr/page.html?any-param=any-value
<link rel="canonical" href="example.com/fr/page.html">

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved