Mobile app version of vmapp.org
Login or Join
Holmes151

: Hreflangs and canonicals. Should I chose the canonical version of the page for hreflang tags? So, basically we have implemented canonical tag, which points to the url with the parameters stripped.

@Holmes151

Posted in: #CanonicalUrl #Hreflang #RelAlternate #RelCanonical

So, basically we have implemented canonical tag, which points to the url with the parameters stripped. For instance, if somebody visits the page
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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Holmes151

1 Comments

Sorted by latest first Latest Oldest Best

 

@Merenda212

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme