Forum Moderators: Robert Charlton & goodroi
<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"> A canonical page is the preferred version of a set of pages with highly similar content.
I think if i include the <link rel="canonical" page, it makes google remove these other different language result, which is not good.
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.
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?
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.
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.
Hopefully google won't consider this as duplicate content due to the alternate tag.
[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]
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 way it covers all current and future parameters you might use in a URL
You're saying all 3 pages you're calling alternates are the canonical version of the page the way you're doing it.
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
What type of alternate are you using and what do you mean by:
How do you convey the message that all parameter-less pages are canonical but, uhm, some are more canonical than others?
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">