# Customise hosted login page to redirect elsewhere for a given email domain

**URL:** <https://community.auth0.com/t/customise-hosted-login-page-to-redirect-elsewhere-for-a-given-email-domain/8748>\
**Category:** Get Help\
**Tags:** hosted-login-page, customize, redirect, javascript\
**Created:** [November 15, 2017, 12:24am UTC](https://community.auth0.com/t/customise-hosted-login-page-to-redirect-elsewhere-for-a-given-email-domain/8748 "2017-11-15T00:24:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin.pain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/martin.pain/32/12776_2.png) [@martin.pain](https://community.auth0.com/u/martin.pain)\
**Post date:** [November 15, 2017, 12:24am UTC](https://community.auth0.com/t/customise-hosted-login-page-to-redirect-elsewhere-for-a-given-email-domain/8748/1 "2017-11-15T00:24:15Z")

</div>

I use a hosted login page, and I’d like to do the following:

When the user enters their email address (or when they click log in), if their email address is for a certain domain, I want to redirect them to a different page.

I’ve found the hosted login page customisation options in the Auth0 dashboard, and I can see that it’s using Auth0 Lock. I looked in the Lock documentation to see if there’s any way to provide a Javascript function to intercept the authentication process at any point, e.g. when they click “log in”, but I can’t see any such option. Is this possible?

---

<div class="post-metadata">

**Author:** ![odell](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/odell/32/10456_2.png) [@odell](https://community.auth0.com/u/odell)\
**Post date:** [November 15, 2017, 5:43pm UTC](https://community.auth0.com/t/customise-hosted-login-page-to-redirect-elsewhere-for-a-given-email-domain/8748/2 "2017-11-15T17:43:35Z")

</div>

I think you need to use rules for that. This should get you going in the right direction:

> **[Redirect Users](https://auth0.com/docs/authenticate/login/redirect-users-after-login)**
>
> Describes how to redirect users to URLs that have not been added to the AllowList.

---

<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:** [March 2, 2018, 5:57am UTC](https://community.auth0.com/t/customise-hosted-login-page-to-redirect-elsewhere-for-a-given-email-domain/8748/3 "2018-03-02T05:57:25Z")

</div>


