Wednesday, September 12, 2018

Tell Google about localized versions of your page

Use hreflang or sitemaps for language- or region-specific pages

If you have multiple versions of a page for different languages or regions, tell Google about these different variations. Doing so will help Google Search point users to the most appropriate version of your page by language or region.

Note that even without taking action, Google might still find alternate language versions of your page, but it is usually best for you to explicitly indicate your language- or region-specific pages.

Some example scenarios where indicating alternate pages is recommended:


  • If you keep the main content in a single language and translate only the template, such as the navigation and footer. Pages that feature user-generated content, like forums, typically do this.
  • If your content has small regional variations with similar content, in a single language. For example, you might have English-language content targeted to the US, GB, and Ireland.
  • If your site content is fully translated into multiple languages. For example, you have both German and English versions of each page.


Methods for indicating your alternate pages

There are three ways to indicate multiple language/locale versions of a page to Google:

HTML tags

HTTP Headers

Sitemap

Guidelines for all methods

  • Each language version must list itself as well as all other language versions.
  • Alternate URLs must be fully-qualified, including the transport method (http/https), so:
  •  https://example.com/foo, not //example.com/foo or /foo
  • Alternate URLs do not need to be in the same domain. 
  • If you have several alternate URLs targeted at users with the same language but in different locales, it's a good idea also to provide a catchall URL for geographically unspecified users of that language. For example, you may have specific URLs for English speakers in Ireland (en-ie), Canada (en-ca), and Australia (en-au), but should also provide a generic English (en) page for searchers in, say, the US, UK, and all other English-speaking locations. It can be one of the specific pages, if you choose.
  • If two pages don't both point to each other, the tags will be ignored. This is so that someone on another site can't arbitrarily create a tag naming itself as an alternative version of one of your pages.
  • If it becomes difficult to maintain a complete set of bidirectional links for every language, you can omit some languages on some pages; Google will still process the ones that point to each other. However, it is important to link newly expanded language pages bidirectionally to the originating/dominant language(s). For example, if your site was originally created in French with URLs on .fr, it's more important to bidirectionally link newer Mexican (.mx) and Spanish (.es) pages to your strong .fr presence, rather than to bidirectionally link your new Spanish language variant pages (.mx and .es) to each other.
  • Consider adding a fallback page for unmatched languages, especially on language/country selectors or auto-redirecting homepages. Use the the x-default value:
Read More: How Google crawls locale-adaptive pages

Supported language/region codes

The value of the hreflang attribute identifies the language (in ISO 639-1 format) and optionally a region (in ISO 3166-1 Alpha 2 format) of an alternate URL. (The language need not be related to the region.) For example:

  • de: German language content, independent of region
  • en-GB: English language content, for GB users
  • de-ES: German language content, for users in Spain


Do not specify a country code by itself. Google does not automatically derive the language from the country code. You can specify a language code by itself if you want to simplify your labeling.  Adding the country code after the language to restrict the page to a specific region.  Examples:

be: Belarusian language, independent of region (not Belgium French)
nl-be: Dutch for Belgium
fr-be: French for Belgium 

For language script variations, the proper script is derived from the country. For example, when using zh-TW for users in Taiwan, the language script is automatically derived (in this example: Chinese-Traditional). You can also specify the script itself explicitly using ISO 15924, like this:

  • zh-Hant: Chinese (Traditional)
  • zh-Hans: Chinese (Simplified)


Alternatively, you can also specify a combination of script and region—for example, use zh-Hans-TW to specify Chinese (Simplified) for Taiwanese users.

Use the x-default tag for unmatched languages

The reserved value hreflang="x-default" is used when no other language/region matches the user's browser setting. This value is optional, but recommended, as a way for you to control the page when no languages match. A good use is to target your site's homepage where there is a clickable map that enables the user to select their country.

Troubleshooting

Common Mistakes
Here are the most common mistakes with hreflang usage:

  • Missing return links: If page X links to page Y, page Y must link back to page X. If this is not the case for all pages that use hreflang annotations, those annotations may be ignored or not interpreted correctly.

  • Incorrect language codes: Make sure that all language codes you use identify the language (in ISO 639-1 format) and optionally the region (in ISO 3166-1 Alpha 2 format) of an alternate URL. Specifying the region alone is not valid.


Debugging hreflang errors
You can use the International Targeting report to debug the most common problems. Make sure that Google has had time to crawl your pages, then visit the Language tab on the report to see if any errors were detected.

There are also many third-party tools available. Here are a few popular tools. (These tools are not maintained or checked by Google.)

  • Aleyda Solis's hreflang tags generator tool for generating or modifying hreflang tags.
  • Merkle SEO hreflang tag testing tool for validating hreflang tags on a single live page.
  • HREFLang checker and validator for validating hreflang tags on a single live page.

Post a Comment

favourite category

...
test section describtion

Whatsapp Button works on Mobile Device only