legacy-knowledge-base
公開されました Sep. 10, 2025

How to Enable Cookies Banner for Specific Sites

written-by

Jamilly Macedo

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

  • Is it possible to enable cookies for a specific site?

Environment

  • Liferay DXP 7.4

Resolution

  • The ability to configure cookies on a per-site basis in Liferay requires defining a virtual host. If a site does not have a virtual host specified, the cookie settings for that site will not take effect, and the instance-wide cookie settings will be used instead.
  • Therefore, to manage cookie settings for a new site, you should define a virtual host and adjust the cookie settings accordingly. If you disable cookie settings for this virtual host, the consent banner will not appear when accessing that site.
  • The decision to require a virtual host for site-specific cookie settings ensures consistency and clarity. This approach guarantees that the correct settings are applied based on the host used in the request.

Additional Information

 

did-this-article-resolve-your-issue

legacy-knowledge-base