Can we use the same friendly URL in a page's translations?


  • We have a page where we want to use the same friendly URL for different translations, but when we try to save the page, it fails with an error:
    • Please enter a unique friendly URL.
  • We understand that the behavior was made by design for SEO purposes, however, we would prefer to use our method, where we have the same URL with different locale prefixes, is that possible?


  • Liferay DXP 7.3+


  • The behavior is intended, however, there is a workaround that might help you if you want to use the same friendly URL in your default language and one of the translations, or if you have a two-language environment. That means you won't be able to do this with two translations.
  • The trick is that if you leave a translation's friendly URL empty, it will be populated with the default language's friendly URL. 
  • Please check the below steps (English was the site's default language in this case and we used the property, where the language key was always displayed in the URL):
    1. Create a page, name it Marketing-news (page name and friendly URL will be Marketing-news)
    2. Add a German translation, name it German, and save without adding the friendly URL
    3. Open the page with a user with English language set -> we had the http://localhost:8080/en/marketing-news URL
    4. Then switch to German either by setting it in the user's account settings or just changing the language key from en to de in the URL -> http://localhost:8080/de/marketing-news
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0