Legacy Knowledge Base
Published Jun. 30, 2025

Page canonical URLs of each existing language always point to the default language URL

Written By

Jorge Diaz

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

We have detected that the page canonical URLs of each existing language always point to the default language URL.

Our default language is English, and we have a page in two languages:

  • English: http://www.example.com/en/products
  • Spanish: http://www.example.com/es/productos

If you check their canonical URLs, both pages have the same pointing to the English version:

<link href="http://www.example.com/en/products" rel="canonical">

The expected behavior would be that every page's canonical URL points to its own language.

Environment

  • DXP 7.2
  • DXP 7.3
  • DXP 7.4

Resolution

As of DXP 7.2, to improve the SEO of your pages there are some functionalities that will allow you to customize how canonical URLs are generated for your pages.

Configuring SEO Globally

In System Settings > Pages > SEO there is a new configuration option.  Here you may choose from two options:

  • Use Default Language URL (enabled by default). When visiting a page in any supported language, the URL of the default language will be used as its canonical URL.
  • Use Localized URL. This option will make the current localized URL the canonical one.

Customizing a Page Canonical URL

Although the global configuration is useful in the general case, sometimes there are situations where you need to customize it at the page level.

In the page settings, there is an SEO panel where with a field to customize the canonical URL to use.

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base