Configuring Your Page’s Friendly URL

Liferay 7.3+

You can set friendly URLs for each of your site’s pages. These URLs make it easy to understand and recall your page’s address while providing key information for search engines and other tools crawling your site.

When you create a site page, a friendly URL is generated to match the page’s name automatically, though you can change it at any time. Liferay also maintains a history of previously used URLs for a page to prevent broken links and provide an easy way to revert changes.

Note

Friendly URLs are normalized automatically for web standards. Special characters like spaces and symbols are replaced with dashes (-) or encoded (e.g., %20 for spaces). For example, /exciting-new-items-for-summer-2024!-best-deals@50%off is normalized to /exciting-new-items-for-summer-2024-best-deals-50-off.

Changing a Page’s Friendly URL

To change a page’s friendly URL, open the Product Menu and go to Site BuilderPages. Then click Actions (Actions button) for the page you want to customize and select Configure.

Click Actions for the page you want to customize, and select Configure

Alternatively, you can access individual page settings by navigating to the page you want to customize and clicking on the Configure Page button (Configure Page Button) at the top right of the Application Bar.

In the General tab, use the Friendly URL field to enter a new URL for the page. To set a localized URL, click on the Language Flag and select your desired language. When finished, click Save.

Use the Friendly URL field to set a page's custom URL.

The value entered in this field is appended to its site URL and must be unique.

Note

When setting a custom URL, you can ignore the site’s page hierarchy. This means a child page need not include its parent as part of its friendly URL.

Managing a Page’s URL History

Liferay DXP maintains a list of all friendly URLs used for a page. This means that when you change a friendly URL, old URLs remain associated with your page to prevent broken links, unless manually removed. For page requests using an old URL, Liferay provides a redirect to the browser (or other consumer) pointing to the active friendly URL. By default, Liferay uses temporary (302) redirects for a page’s friendly URL history, but you can configure the type if needed. See Configuring Friendly URL Redirects

To view and manage the full list of URLs associated with a page, click History (Friendly URL History icon). This displays the page’s active and old URLs for the selected language. You can also click Language Flag to view set URLs for other languages.

View a page's friendly URL History by language.

From here, you can hover over an old URL to reveal the following options:

Restore URL: If you want to replace the active URL with an old one, click Restore URL (Restore icon) for the URL you want to make active.

Forget URL: If you no longer want a friendly URL associated with a page, click Forget URL (Delete icon). When users attempt to access the page using a forgotten URL, the link breaks and Liferay renders a “Not found” message.

Hover over an old URL to reveal the Restore and Forget options.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy