Tell a multilingual site from a multi-regional one
A multilingual site offers content in more than one language, such as English and French versions of a Canadian business site. A multi-regional site explicitly targets users in different countries, such as a manufacturer that ships to Canada and the United States. Many sites are both. A business might run a US version and a Canadian version, and the Canadian version might come in French and English. Work out which case applies to you first.
Give each language version its own URL
Google recommends a different URL for each language version of a page, rather than using cookies or browser settings to change the language on one URL. Google may not find every variation if the language changes on the fly. Googlebot usually crawls from the USA, and it sends requests without an Accept-Language header. Consider linking to the other language versions from each page, so users can switch language themselves. Avoid redirecting people automatically based on what you think their language is, because that can stop users and search engines from reaching every version.
Choose a URL structure that shows the target
Google describes four common patterns. A country-specific domain, such as example.de, gives clear geotargeting, and server location is irrelevant to it. It costs more, may have limited availability, and can target only one country. A subdomain on a generic top-level domain, such as de.bluepeak.com, is easy to set up and can sit on different servers, but users may not tell from the address alone whether de means the language or the country. A subdirectory, such as bluepeak.com/de/, is easy to set up and low maintenance, but it stays on one server location and is harder to separate from the rest of the site. URL parameters, such as site.com?loc=de, are not recommended. Localized words are fine in a URL, and so are internationalized domain names, as long as the URL uses UTF-8.
Know the signals Google uses for the target locale
Google combines several signals. A country-code top-level domain, such as .de for Germany, is a strong country signal, though some ccTLDs have restrictions, and some vanity ccTLDs such as .tv and .me are treated as generic domains. Hreflang annotations count too, whether they sit in tags, headers or sitemaps. Server location is a signal, but not a definitive one, because some sites use content delivery networks. Local addresses and phone numbers, local language and currency, links from local sites and a Business Profile can also help. Google ignores locational meta tags such as geo.position. Google also advises against adapting content by IP address, because IP location analysis is difficult and generally unreliable. Use hreflang, alternate URLs or explicit links to show each variation.
Make the page language obvious
Google uses the visible content of a page to work out its language. It does not rely on lang attributes or the URL for this. Use one language for the content and navigation on each page, and avoid side-by-side translations. Translating only the boilerplate, such as menus and labels, while the bulk of the content stays in one language can give a poor experience, because the same content may appear in results with different boilerplate languages. Google also says that localized versions count as duplicates only when the main content stays untranslated.
Use valid language and region codes
The first code in an hreflang value is the language, in ISO 639-1 format. An optional second code is the region, in ISO 3166-1 Alpha 2 format, such as en-GB. Google accepts lowercase or uppercase codes, but uppercase region codes follow the ISO convention. A region code on its own is invalid, because the first code always names the language. The code be is the Belarusian language, so for Belgium use de-BE, nl-BE or fr-BE. You can also name a language alone, such as de. Scripts work too: zh-Hant for Traditional Chinese, zh-Hans for Simplified, and zh-Hans-US for Simplified Chinese aimed at users in the United States. Codes such as es-419 are not supported. Reserved codes such as EU, UN and UK have no effect on Search.
Add hreflang with tags, headers or a sitemap
Google treats the three methods as equivalent, so choose the one that is easiest to maintain. Using all three gives no benefit in Search and makes the setup harder to manage. In HTML, add a link element with rel="alternate" and an hreflang attribute to the head of each page. For non-HTML files such as PDFs, return a Link header with the same information in the HTTP response. In an XML sitemap, declare the xhtml namespace, then add an xhtml:link entry for each variant inside each url element. A sitemap can list only URLs at or below the directory where it is hosted. The XML sitemaps guide on this site covers the sitemap format.
Link every version to every other version
Each language version must list itself as well as every other version. The set of links is identical on every version. Keep each hreflang link as its own link element, without other attributes such as media. Place the links inside a well-formed head section. If you are unsure, paste the rendered page into an HTML validator and check that the links sit inside the head. Use fully qualified alternate URLs that include the http or https part, such as https://bluepeak.com/foo. Alternate URLs do not need to be on the same domain. Google ignores the tags if two pages do not point to each other, which stops a site on another domain from claiming your pages.
Add reciprocal links in phases
If keeping a full set of links for every language becomes hard, you can leave some languages off some pages. Google still processes the pairs that point to each other. Link new language versions back to the original or dominant language first. For example, if a site started in French on a .fr domain, newer Mexican and Spanish pages should link to the .fr pages before they link to each other, because the French presence is the stronger one.
Add an x-default page and a catchall
Add a fallback with hreflang x-default. It points to the page for visitors whose language is not on your list, and it suits a language selector or an automatic redirect on the home page. The x-default value needs no language code. If you have several locales for one language, such as en-IE, en-CA and en-AU, consider a generic en page for everyone else who speaks English in other locations. One of the specific pages can play that role.
Avoid the common mistakes
Google lists four errors that come up often. The first is a missing return link. If page X links to page Y, page Y must link back to page X, or the tags may be ignored. The second is an incorrect language code, one that does not identify a language in ISO 639-1 format. The third is an incorrect region code, one that is not an officially assigned ISO 3166-1 Alpha 2 element. The fourth is a reserved code, which Google Search ignores. Check each of these when you add a new locale.
Check the markup with a tool
Third-party tools can check hreflang annotations. Google links to two of them in its documentation: Aleyda Solis's hreflang tags generator, which can generate or modify tags, and Merkle's hreflang tag testing tool, which validates tags on a single live page. Google says these tools are not maintained or checked by Google, so treat their results as a second opinion. Run the check on the rendered page, then confirm that every version returns the same set of links.
A worked example with a made-up shoe shop
Imagine a shoe shop that serves the United Kingdom, the United States and Germany. It runs three language versions, en-gb, en-us and de, and a default country selector page. Each version lists all four URLs in its head, including itself, and the selector page is marked as x-default. The UK version shows sterling and the US version shows dollars. Before launch, the team runs a validator and finds one German page that is missing its return link to the UK version. The fix is a single added link element. The example is invented, and it shows the method only.
Related help
Sources for technical rules
Google's documentation is the authority for its own search systems. This guide explains the work in our words.