# Is it possible to set a .domain cookie in a rule?

**URL:** <https://community.auth0.com/t/is-it-possible-to-set-a-domain-cookie-in-a-rule/46891>\
**Category:** Get Help\
**Created:** [July 25, 2020, 9:23am UTC](https://community.auth0.com/t/is-it-possible-to-set-a-domain-cookie-in-a-rule/46891 "2020-07-25T09:23:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carolus](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/carolus/32/13315_2.png) [@carolus](https://community.auth0.com/u/carolus)\
**Post date:** [July 25, 2020, 9:23am UTC](https://community.auth0.com/t/is-it-possible-to-set-a-domain-cookie-in-a-rule/46891/1 "2020-07-25T09:23:15Z")

</div>

When logging in for SSO I need to set a .domain cookie and not a subdomain.domain cookie as the current login does. It is possible to do this in a rule?

---

<div class="post-metadata">

**Author:** ![sgo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgo/32/13789_2.png) [@sgo](https://community.auth0.com/u/sgo)\
**Post date:** [July 26, 2020, 9:22am UTC](https://community.auth0.com/t/is-it-possible-to-set-a-domain-cookie-in-a-rule/46891/2 "2020-07-26T09:22:12Z")

</div>

Hi @carolus,

Unfortunately for your use case rules cannot alter cookies. The only way to change this I am aware of is to use a custom domain, but this would still be a sub-domain cookie. [Custom Domains](https://auth0.com/docs/custom-domains)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 10, 2020, 9:22am UTC](https://community.auth0.com/t/is-it-possible-to-set-a-domain-cookie-in-a-rule/46891/3 "2020-08-10T09:22:14Z")

</div>

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