# How to change the path attribute of dtCookie

**URL:** <https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic\
**Created:** [March 18, 2019, 12:35pm UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037 "2019-03-18T12:35:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntanaka](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@ntanaka](https://community.dynatrace.com/u/ntanaka)\
**Post date:** [March 18, 2019, 12:35pm UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037/1 "2019-03-18T12:35:25Z")

</div>

Hi,

I know we can change the domain attribute of dtCookie.  
The configuration is below;  
Application settings \> Advanced setup \> Cookie and header settings \> Domain to be used for cookie placement

Then, how about path attribute?  
Does anyone know how to change the path attribute of dtCookie?

Best Regards,  
Natsumi Tanaka

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [June 8, 2020, 5:52pm UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037/2 "2020-06-08T17:52:20Z")

</div>

So you can change the domain from the advanced settings in the WebUI, this is necessary when sometimes cookies are not set on the correct domain, in the case of no correlation between user actions and server side PurePath’s, and some other scenarios.

But I haven’t been able to find much on a path attribute for the dtCookie, I did find some information on the `secure` attribute for the dtCookie.

Dynatrace allows you to set the `Secure` cookie attribute for all cookies that are set by Dynatrace. By applying this attribute (i.e, flag) on the `set-cookie` header, you can ensure that the browser sends these cookies only over secure connections.

Here’s the documentation for this, let me know if this is something along the lines of what you were looking for.

> **[Cookies and client-side storage for RUM and Session Replay](https://docs.dynatrace.com/docs/manage/data-privacy-and-security/data-privacy/rum-cookies-and-web-storage)**
>
> Learn how Dynatrace RUM and Session Replay use cookies, web storage, and IndexedDB.

---

<div class="post-metadata">

**Author:** ![ntanaka](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@ntanaka](https://community.dynatrace.com/u/ntanaka)\
**Post date:** [June 11, 2020, 9:06am UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037/3 "2020-06-11T09:06:13Z")

</div>

Thank you for your response.

In our customer case, they have different hosts on the same domain, like this.

- [https://xxx.com/A-service](https://xxx.com/A-service) on Host A (with OneAgent and ruxitjs)

- [https://xxx.com/B-service](https://xxx.com/B-service) on Host B (without OneAgent)

When users access [https://xxx.com/A-service](https://xxx.com/A-service), the browser obtain dtCookie and next they access [https://xxx.com/B-service](https://xxx.com/B-service), it share dtCookie.

However, [https://xxx.com/B-service](https://xxx.com/B-service) is not accept any other cookie, so the session expired error occurs.

So, I think if we could define path attribute of dtCookie, then it would be resolved…

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [June 11, 2020, 11:55am UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037/4 "2020-06-11T11:55:32Z")

</div>

Thank you for the additional information, This is quite a unique case and I would recommend opening a support ticket. Support with be able to work through this with you and provide a resolution even if that means a change in the back end of your tenant.

---

<div class="post-metadata">

**Author:** ![ntanaka](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@ntanaka](https://community.dynatrace.com/u/ntanaka)\
**Post date:** [June 12, 2020, 3:59am UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037/5 "2020-06-12T03:59:56Z")

</div>

Thank you for your response.  
I am glad to know it is a unique case!

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [June 12, 2020, 12:16pm UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037/6 "2020-06-12T12:16:34Z")

</div>

You’re welcome. If you are satisfied with this answer, please mark this as such. Also if you’d like to reward the user who supplied the answer, please click Reward User and award points as you see fit.

---

<div class="post-metadata">

**Author:** ![ntanaka](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@ntanaka](https://community.dynatrace.com/u/ntanaka)\
**Post date:** [June 15, 2020, 12:35am UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037/7 "2020-06-15T00:35:18Z")

</div>

Thank you for your answer.  
I marked your answer as best answer!

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [June 15, 2020, 12:02pm UTC](https://community.dynatrace.com/t/how-to-change-the-path-attribute-of-dtcookie/20037/8 "2020-06-15T12:02:52Z")

</div>

Thank you, Its is much appreciated!
