legacy-knowledge-base
Publicado Jul. 25, 2002

How to keep the session logged between different subdomains

written-by

Rodrigo Mier

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

learn-legacy-article-disclaimer-text

Issue

  • You need to logging each time you enter in each site even sub domines of the same domain.
  • To keep de same session across different sites that are subdomains of the same domain. For example siteA.example.com and siteB.example.com

Environment

  • Portal 6.2
  • DXP 7.0
  • DXP 7.1
  • DXP 7.2
  • DXP 7.3
  • DXP 7.4

Resolution

  • To keep the same session between subdomains, the domain has to be defined in the session cookie with the following portal property:
    session.cookie.domain=example.com
  • If you use tomcat, you have to modify one extra property
    session.cookie.use.full.hostname[tomcat]=false
  • In addition, the domain must be defined in the context of the application server.
    • In this example, with Tomcat you can define it in their context.xml file with the following parameter:
      <Context sessionCookiePath="/" sessionCookieDomain="example.com">

Additional Information

did-this-article-resolve-your-issue

legacy-knowledge-base