Legacy Knowledge Base
Published 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

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

  • 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