Legacy Knowledge Base
Published Sep. 10, 2025

How to remove unnecessary parts from the URL / shorten URL / make URL friendlier

Written By

Alexandra Rujzam

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 would like to remove the web/guest part of the URL, to shorten it
    e.g. http://www.example.com/web/guest/home-> http://www.example.com/home 

Environment

  • Liferay Portal 6.2
  • Liferay DXP 7.0-7.4

Resolution

The default public Site base URL is https://localhost:8080/web/<site-friendly-url>, and the private one is https://localhost:8080/group/<site-friendly-url>

To remove these parts from the URL, you have to specify your domain as a virtual host of your site:

  1. You have to go to
    • DXP 7.0-7.3: Admin Menu > Configuration > Site Settings section > drop-down the "Site URL" portion of the configuration page
    • DXP 7.4: Admin Menu > Configuration > Site Settings section > Site Configuration > click on "Site URL" in the left side
  2. You have to specify virtual hosts for the public and private pages.
    • e.g. add www.example.com to public pages
  3. Now the Home page opens as http://www.example.com/home 

Note: If you want to test this on your local computer, you will have to modify the /etc/hosts file to include the custom domain (www.example.com) to point to 127.0.0.1

Did this article resolve your issue ?

Legacy Knowledge Base