Warning: This specific configuration of rel-alternate-hreflang markup has been replaced by the general guidelines for multilingual and multi-regional content. Please see using hreflang for language and regional URLs for our current recommendations.
<link rel=”alternate” hreflang="a-different-language" href="http://url-of-the-different-language-page" />
rel=”alternate” hreflang=”x”
rel=”canonical”
Step 1: Select the proper canonical.The canonical designates the version of your content you’d like indexed and returned to users.The first step towards making the right content indexable is to pick one canonical URL that best reflects the genuine locale of the page’s main content. In the example above, since Javier is a Spanish-speaking user and he created his profile on es.example.com, http://es.example.com/javier-lopez is the logical canonical. The title and snippet in all locales will be selected from the canonical URL.Once you have the canonical URL picked out, you can either:A. 301 (permanent redirect) from the language variants to the canonicalAs an example, if a French speaker visits fr.example.com/javier-lopez (not the canonical), have this page include a cookie to remember the user's language preference of French. Then permanently redirect from fr.example.com/javier-lopez to the canonical at es.example.com/javier-lopez. Because of the cookie, es.example.com/javier-lopez will still render its boilerplate in French (even on the es.example.com subdomain!). Similarly, en.example.com/javier-lopez would set the value of this cookie to English and then 301 redirect to es.example.com/javier-lopez.Including a language selection link is also helpful should a multilingual user prefer a different experience of your site.B. Use rel=”canonical”On the other language variants, include a link rel=”canonical” tag pointing to your chosen canonical. In our example, since the canonical for Javier’s profile is the Spanish version, the English and French pages (and optionally even the Spanish page itself) would include <link rel=”canonical” href="http://es.example.com/javier-lopez" />.Cookies are not involved in this setup. Therefore, a French speaker will be served es.example.com/javier-lopez with a Spanish template. Implement step 2 if you want the French speakers to be served the French version at fr.example.com/javier-lopez in Google search results.Step 2: In the canonical URL, specify the various language versions via the rel=”alternate” link tag, using its hreflang attribute. rel=”alternate” URLs can be displayed in search results in accordance with a user’s language preference. The title and snippet, however, remain generated from the canonical URL (as is customary with rel=”canonical”), not from the content of any rel=”alternate”.You can help Google display the correctly localized variant of your URL to our international users by adding the following tags to http://es.example.com/javier-lopez, the selected canonical:<link rel=”alternate” hreflang="en" href="http://en.example.com/javier-lopez" /><link rel=”alternate” hreflang="fr" href="http://fr.example.com/javier-lopez" />rel=”alternate” indicates that the URL contains an alternate version located at the URI of the href value. hreflang identifies the language code of the alternate URL and can be specified with ISO-639.Please note: If your site supports many languages and you’re worried about the increased file size when declaring numerous rel=”alternate” URLs, please see our Help Center article about configuring rel=”alternate” with file size constraints.
The first step towards making the right content indexable is to pick one canonical URL that best reflects the genuine locale of the page’s main content. In the example above, since Javier is a Spanish-speaking user and he created his profile on es.example.com, http://es.example.com/javier-lopez is the logical canonical. The title and snippet in all locales will be selected from the canonical URL.Once you have the canonical URL picked out, you can either:A. 301 (permanent redirect) from the language variants to the canonicalAs an example, if a French speaker visits fr.example.com/javier-lopez (not the canonical), have this page include a cookie to remember the user's language preference of French. Then permanently redirect from fr.example.com/javier-lopez to the canonical at es.example.com/javier-lopez. Because of the cookie, es.example.com/javier-lopez will still render its boilerplate in French (even on the es.example.com subdomain!). Similarly, en.example.com/javier-lopez would set the value of this cookie to English and then 301 redirect to es.example.com/javier-lopez.Including a language selection link is also helpful should a multilingual user prefer a different experience of your site.B. Use rel=”canonical”On the other language variants, include a link rel=”canonical” tag pointing to your chosen canonical. In our example, since the canonical for Javier’s profile is the Spanish version, the English and French pages (and optionally even the Spanish page itself) would include <link rel=”canonical” href="http://es.example.com/javier-lopez" />.Cookies are not involved in this setup. Therefore, a French speaker will be served es.example.com/javier-lopez with a Spanish template. Implement step 2 if you want the French speakers to be served the French version at fr.example.com/javier-lopez in Google search results.
A. 301 (permanent redirect) from the language variants to the canonicalAs an example, if a French speaker visits fr.example.com/javier-lopez (not the canonical), have this page include a cookie to remember the user's language preference of French. Then permanently redirect from fr.example.com/javier-lopez to the canonical at es.example.com/javier-lopez. Because of the cookie, es.example.com/javier-lopez will still render its boilerplate in French (even on the es.example.com subdomain!). Similarly, en.example.com/javier-lopez would set the value of this cookie to English and then 301 redirect to es.example.com/javier-lopez.Including a language selection link is also helpful should a multilingual user prefer a different experience of your site.B. Use rel=”canonical”On the other language variants, include a link rel=”canonical” tag pointing to your chosen canonical. In our example, since the canonical for Javier’s profile is the Spanish version, the English and French pages (and optionally even the Spanish page itself) would include <link rel=”canonical” href="http://es.example.com/javier-lopez" />.Cookies are not involved in this setup. Therefore, a French speaker will be served es.example.com/javier-lopez with a Spanish template. Implement step 2 if you want the French speakers to be served the French version at fr.example.com/javier-lopez in Google search results.
link rel=”canonical”
<link rel=”canonical” href="http://es.example.com/javier-lopez" />
hreflang
You can help Google display the correctly localized variant of your URL to our international users by adding the following tags to http://es.example.com/javier-lopez, the selected canonical:<link rel=”alternate” hreflang="en" href="http://en.example.com/javier-lopez" /><link rel=”alternate” hreflang="fr" href="http://fr.example.com/javier-lopez" />rel=”alternate” indicates that the URL contains an alternate version located at the URI of the href value. hreflang identifies the language code of the alternate URL and can be specified with ISO-639.Please note: If your site supports many languages and you’re worried about the increased file size when declaring numerous rel=”alternate” URLs, please see our Help Center article about configuring rel=”alternate” with file size constraints.
<link rel=”alternate” hreflang="en" href="http://en.example.com/javier-lopez" />
<link rel=”alternate” hreflang="fr" href="http://fr.example.com/javier-lopez" />
rel=”alternate”
href
either 301s with a language cookie or contains <link rel=”canonical” href=”http://es.example.com/javier-lopez” />
<link rel=”canonical” href=”http://es.example.com/javier-lopez” />
is the canonical and contains<link rel=”alternate” hreflang="en" href="http://en.example.com/javier-lopez" />and<link rel=”alternate” hreflang="fr" href="http://fr.example.com/javier-lopez" />
en.example.com/javier-lopez
fr.example.com/javier-lopez
es.example.com/javier-lopez
Enter your email address:
Delivered by FeedBurner