- I start Liferay
- I create a new site with a new page
- I sign out
- I navigate to the newly created page and inspect the HTML: <link href="http://localhost:8080/sitename" rel="canonical">
- I switch to another language (eg: German) by navigating to http://localhost:8080/de/sitename
- I inspect the HTML again
The output should read as follows: <link href="http://localhost:8080/de/sitename" rel="canonical">
The output reads as follows: <link href="http://localhost:8080/sitename" rel="canonical">
- Liferay 6.2
- Liferay DXP 7.0
- Liferay DXP 7.1
In the affected Liferay versions, the canonical tag is always set to the default language URL.
The behavior is based on the assumption that default language for a site means that all content will normally be added for this language and non-default language pages have a reasonable probability of containing duplicate, untranslated content.
In situations where the sites are translated into multiple languages, being able to index the different versions is a reasonable expectation and Liferay has implemented this as a new feature in DXP 7.2 SP1.
- This section in our Knowledge Base documents how the setting for individual pages works: https://help.liferay.com/hc/en-us/articles/360028819912-Individual-Page-Settings#seo
- This Epic contains the details of the implementation of this new feature: LPS-9764