# Rules to Actions Migration Question

**URL:** <https://community.auth0.com/t/rules-to-actions-migration-question/78132>\
**Category:** Get Help\
**Created:** [February 11, 2022, 6:48pm UTC](https://community.auth0.com/t/rules-to-actions-migration-question/78132 "2022-02-11T18:48:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandre.boulay](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alexandre.boulay/32/33806_2.png) [@alexandre.boulay](https://community.auth0.com/u/alexandre.boulay)\
**Post date:** [February 11, 2022, 6:48pm UTC](https://community.auth0.com/t/rules-to-actions-migration-question/78132/1 "2022-02-11T18:48:50Z")

</div>

Hi,

My team is planning to migrate from rules to actions. We are looking at the different changes that need to be made.

One of the things we noticed is that `auth0.domain` is no longer exposed.

[I noticed in your migration guide that one of your exemples uses `auth0.domain`](https://auth0.com/docs/customize/actions/migrate/migrate-from-rules-to-actions#convert-other-management-api-calls)

The transition seems to imply you have to store the domain as a secret inside your action.

However, one team member found that it can be accessed through `event.request.hostname`.

Can we consider `event.request.hostname` to be the new `auth0.domain` ?

Thank you

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [February 11, 2022, 8:23pm UTC](https://community.auth0.com/t/rules-to-actions-migration-question/78132/3 "2022-02-11T20:23:04Z")

</div>

Hi @alexandre.boulay,

Thanks for reaching out to the Auth0 Community!

> [@alexandre.boulay](#):
>
> Can we consider `event.request.hostname` to be the new `auth0.domain` ?

After testing this thoroughly, I found that the `auth0.domain` in **Rules** references the domain in the following format `YOUR_DOMAIN.REGION.auth0.com`.

Whereas the `event.request.hostname` in **Actions** references the domain in the `YOUR_DOMAIN.auth0.com` format.

Since the domain expects the URL with the region (i.e, `my-dev.us.auth0.com`), you need to use the _secrets_ in Actions to reference the correct domain URL.

Hoped this helps!

Please let me know if you have any further questions.

Thank you.

---

<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:** [February 26, 2022, 8:23pm UTC](https://community.auth0.com/t/rules-to-actions-migration-question/78132/4 "2022-02-26T20:23:12Z")

</div>

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