Legacy Knowledge Base
Published Sep. 10, 2025

Removing '/web/' From Auto-Generated URLs

Written By

Liferay Support

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.

This article documents how the Liferay platform will automatically generate URLs appended with /web/, which can also be changed to a friendly URL. This may be an issue for those who do not want to append generated endings to URLs.

For instance: http://liferay.com/web/page.html becomes http://liferay.com/page.html 

Resolution

URL rewrites and redirection must be configured on the Web Server directly. One example to resolve this issue is by adding the following portal property:

  • In Liferay Portal 6.1 EE and above: virtual.hosts.default.site.name=Guest
  • In Liferay Portal 6.0 EE and below: virtual.hosts.default.community.name=Guest

Please note that localhost will not work with this property, so in a test environment the hosts file must be redirected to something other than localhost.

If you prefer to do this through the portal here are the alternative steps:

  1. Control Panel-> Site Settings -> Site URL 
    1. As an example, from here you can set the virtual host to say something like, www.test.com
  2. If testing this locally, you will need to navigate to hosts.txt in C:\Windows\System32\drivers\etc and add to the bottom line 127.0.0.1 www.test.com 
    1. Make sure to remove it when testing is complete 
  3. Site URLs should now show up as www.test.com/page1/2/3/etc. for that site 

Additional Information

If you wish to keep a naming scheme, you can use the friendly URL that will change the /guest portion. Or if you are using a virtual host and desire to incorporate a naming scheme you can manage the page URLs individually by clicking manage page while on the page. 

Did this article resolve your issue ?

Legacy Knowledge Base