Legacy Knowledge Base
Published Sep. 10, 2025

Users are getting different behaviors when accessing different URLs as their virtual hosts

Written By

Justin Mann

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

  • The environment is set up so that 2 different domains are acting as their virtual hosts
  • When a user accesses one domain and logs in, and then switches to the other domain name, they find that user sessions are not carried through to each URL

Environment

  • Liferay DXP 7.3+

Resolution

  • This is the intended behavior
  • User sessions and cookies are tied to the domain name, so when switching between different domain names and virtual hosts of the same environment, it is expected that the user would have to authenticate again
  • This is true as well for domain names that have a www pre-pended to it and the same name without the www prefix.
    • For example: www.test.com and test.com are two separate domain names, and as such, user sessions would not be carried over between the two
Did this article resolve your issue ?

Legacy Knowledge Base