I have a hard time on how to choose the canonical meta tag reference in combination with hreflang references in the following scenario:

  • The server chooses the approprate language for the user via accept-language header and other signals (unless overridden via URL parameter by explicit user language change via in-site language picker).
  • I want the urls used in search results and other incoming links to be without language override parameter.

Therefore I use

<link rel="alternate" hreflang="de" href="https://example.com?l=de" />
<link rel="alternate" hreflang="fr" href="https://example.com?l=fr" />
<link rel="alternate" hreflang="x-default" href="https://example.com" />
<link rel="canonical" href="https://example.com" />

Now I read about a rule that hreflang should always point to a canonical url, which this is violating. How can it be addressed?

  • Links and search results should always include the URL parameter. It is much more reliable to link to the desired language that matches the language of the referring document rather than let the server guess. accept-language can't be trusted well enough for that. Sep 23, 2022 at 10:51

2 Answers 2


Google gives the site owner the ability to explain to the search engine that the site works for different languages and countries by supporting the hreflang="x" rel="alternate" attributes. Thus, if your site has a free choice of language and country, all possible options should be added to each page. This should help the search engine figure out which page in the search results to show the user. For our example it will be like this:

<link rel="alternate" hreflang="x-default" href="https://web.com/"> 

<link rel="alternate" hreflang="en-us" href="https://web.com/en-us/"> 

<link rel="alternate" hreflang="en-ua" href="https://web.com/en-ua/"> 
<link rel="alternate" hreflang="de" href="https://web.com/de/"> 

And canonical

<!DOCTYPE html>
<html class="no-js" lang="en-US">

<link rel="canonical" href="https://web.com/en-us/">

You're using a parameter for the multi-language target. You have to create different sites for different languages. It can be a subdomain/directory/different domain or ccTLD. It's not possible to add canonical on parameter pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.