# Setting domain name in session cookies

**URL:** <https://discuss.elastic.co/t/setting-domain-name-in-session-cookies/354743>\
**Category:** Kibana\
**Created:** [March 5, 2024, 2:03pm UTC](https://discuss.elastic.co/t/setting-domain-name-in-session-cookies/354743 "2024-03-05T14:03:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antim\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antim_k/32/124956_2.png) [@Antim\_K](https://discuss.elastic.co/u/Antim_K)\
**Post date:** [March 5, 2024, 2:03pm UTC](https://discuss.elastic.co/t/setting-domain-name-in-session-cookies/354743/1 "2024-03-05T14:03:24Z")

</div>

I'm working on a project where I need more granular control over the session cookies used by Kibana. I need to set a specific domain name for Kibana session cookies. But haven't found any official way to set domain name through kibana.yaml file.

I've tried configuring Nginx as a reverse proxy using the `proxy_cookie_domain` directive to replace the cookie domain. Unfortunately, this hasn't worked as intended.

I tried like:

"proxy\_cookie\_domain domain replacement;"

Any guidance on this, how I can set the domain name in session cookie?

I need one more clarificatin about cookie behavior of kibana (elastic stack) between a main domain (example(dot)com) and a subdomain (server1(dot)example()dot com). Will cookies set on example(dot)com automatically be sent to requests on server1(dot)example(dot)com?

Are there official documentation this, like the default behviour of the cookies set by elastic stack (Kibana)?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 2, 2024, 2:04pm UTC](https://discuss.elastic.co/t/setting-domain-name-in-session-cookies/354743/2 "2024-04-02T14:04:11Z")

</div>

Closed on April 2, 2024, 2:04pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
