Canonical tags are not language specific


  1. I start Liferay
  2. I create a new site with a new page
  3. I sign out
  4. I navigate to the newly created page and inspect the HTML: <link href="http://localhost:8080/sitename" rel="canonical">
  5. I switch to another language (eg: German) by navigating to http://localhost:8080/de/sitename
  6. I inspect the HTML again

Expected Result:
The output should read as follows: <link href="http://localhost:8080/de/sitename" rel="canonical">

Actual Result:
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.

Additional Information

0 人中有 0 人觉得有帮助