1

So, basically we have implemented canonical tag, which points to the url with the parameters stripped. For instance, if somebody visits the page

https://mywebsite.com/en/some-page.php?someparameter=value

The value of the canonical tag on this page would be:

<link href="https://mywebsite.com/en/some-page.php" rel="canonical" />

Now, how should we go about hreflang tag in this case?

Should it point to the canonical language versions of the page like that?

<link href="https://mywebsite.com/ru/some-page.php" rel="alternate" hreflang="ru" />
<link href="https://mywebsite.com/en/some-page.php" rel="alternate" hreflang="en" />

or should it use the exact url accessed by the user?

<link href="https://mywebsite.com/ru/some-page.php?someparameter=value" rel="alternate" hreflang="ru" />
<link href="https://mywebsite.com/en/some-page.php?someparameter=value" rel="alternate" hreflang="en" />

Which is the right scenario? Thank you.

1

If parameter is not affecting content than you need to specify passive typed parameter in URL Parameters tool and use your first solution:

<link href="https://mywebsite.com/ru/some-page.php" rel="alternate" hreflang="ru" />
<link href="https://mywebsite.com/en/some-page.php" rel="alternate" hreflang="en" />

In that case you don't need to specify canonical:

<link href="https://mywebsite.com/en/some-page.php" rel="canonical" />

Note: Consider of using active parameter type in case it actually affects page content

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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