# Setting Cookie on the Main Domain

This feature determines whether first-party identifiers (f.e. JENTIS User-ID) is stored at the website’s subdomain or main domain level in your containers.

To configure this, go to **Account Settings** on the JENTIS Platform and click on **Containers**. Then, create a new container by clicking on **Add New Container**, or choose the container you want to edit and click on the three dots > **Edit**.

You will see the **Main Domain Cookie** feature in the **Advanced Settings** on your container configuration.

<figure><img src="/files/91nuUCjJTIqTp1yryE8Y" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
By default, the Main Domain Cookie option is enabled, which means the first-party identifiers are configured to be set at the main domain level.
{% endhint %}

To demonstrate the impact of setting the JENTIS Cookie on the main domain or subdomain levels, let's consider the following example:

JENTIS is implemented in this domain <https://ckion-dev.jtm-demo.com/>. The behavior of the JENTIS First-Party User ID (jts-rw cookie) can be observed based on whether the **Main Domain Cookie** is enabled or disabled:

1. **If the Main Domain Cookie is enabled** (Default)**:**
   * The cookie is set on the **main domain level**, in this case: `.jtm-demo.com`.
   * This means the cookie is accessible across all sub-domains of `jtm-demo.com`, such as `ckion-dev.jtm-demo.com`, `analytics.jtm-demo.com`, etc.\\
2. **If the Main Domain Cookie is disabled:**
   * The cookie is set on the **current sub-domain** level, in this case: `ckion-dev.jtm-demo.com`.
   * This means the cookie is only accessible within the specific sub-domain `ckion-dev.jtm-demo.com` and not shared with other sub-domains.

{% hint style="warning" %}
**Important**: Disabling the Main Domain Cookie (which sets the JENTIS cookie on the subdomain) will result in users from the subdomain receiving different identifiers, such as JENTIS User-ID. This change can impact your tracking and data consistency.
{% endhint %}

In case you’ve already had a container configured before 11 Dec 2024:

* If your container is configured to your main domain (e.g., `example.com`), the Main Domain Cookie option will be enabled. This means the first-party identifiers will be set at the **main domain level**.
* If your container is configured to a subdomain (e.g,. `shop.example.com`), the Main Domain Cookie option will be disabled. This means the first-party identifiers will be set at the **subdomain level**.

To change this configuration, follow the steps mentioned above.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jentis.com/key-features/main-domain-cookie/setting-cookie-on-the-main-domain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
