Language codes in URLs
If you support more than one language on your website, then these conditions apply to
URLs:
- Language codes are not used for pages in the website's default language.
- If a language is used in only one locale, then the language code is added to the URL.
For example, if you offer French content in French (Canada) only, then
fr
is added to the URL:https://www.mywebsite.com/fr/home
. - If a language is used in more than one locale, then the language code is added to the
URL for pages in the locale that is first in the list of available languages for the
website. The language and locale code is added to the URLs for pages in all other locales.
For example, if French (Canada) is listed before French (France), then
fr
is used in the URLs for Canadian French content. For French (France) content,fr-FR
is used in the URL:https://www.mywebsite.com/fr-FR/home
.
For information about the availability of languages on the website, see Selecting languages for the site.