Legacy Knowledge Base
Published Jun. 30, 2025

How changing the site default language affects Web Contents' friendly URLs

Written By

Daniel Couso

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

  • There is a site (My Site) with two available languages: es-ES and en-US, where es-ES is the default language.
  • My Site's web contents have their title and friendly URL defined only for the default language (es-ES).
  • The locale.prepend.friendly.url.style property is set to 3, its default value.
  • There are some external links to many web contents and we want to change My Site's default language from es-ES to en-US.
  • How will this change affect navigation in relation to Web Contents' friendly URLs?

Environment

  • Liferay DXP 7.1+

Resolution

  • Impacts and points to be taken into account after the change:
    • Web contents already created will keep their default language, unless they are manually changed.
    • After the change, it will be required to reindex the web contents.
    • Having added the Web Content's friendly URL for en-US as content-web-1 and taking the following URLs to access as examples, the redirects will behave as follows:
      es-ES: /web/my-site/-/contenido-web-1
      en-US: /en/web/my-site/-/contenido-web-1
      
      • The friendly URL /web/my-site/-/content-web-1 will redirect to /web/my-site/-/content-web-1 if the language in use is en-US and to /es/web/my-site/-/content-web-1 if the language in use is es-ES.
      • The friendly URL /en/web/my-site/-/content-web-1 will redirect to /en/web/my-site/-/content-web-1 regardless of the language in use.

 

 

 

Did this article resolve your issue ?

Legacy Knowledge Base