# Email verification redirectTo URL

**URL:** <https://community.auth0.com/t/email-verification-redirectto-url/187479>\
**Category:** Get Help\
**Tags:** email-verification, user-management\
**Created:** [June 2, 2025, 12:10pm UTC](https://community.auth0.com/t/email-verification-redirectto-url/187479 "2025-06-02T12:10:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacevedo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jacevedo/32/61733_2.png) [@jacevedo](https://community.auth0.com/u/jacevedo)\
**Post date:** [June 2, 2025, 12:10pm UTC](https://community.auth0.com/t/email-verification-redirectto-url/187479/1 "2025-06-02T12:10:33Z")

</div>

Ready to post? 🔎 First try searching for your answer. Hello,

I have an application whit DEV and localhost environment in the same tenant. I need to redirect user when verify email to the each base URL.

Im using actually  
`{% if application.callback_domain == 'localhost' %}https://localhost:3001{% else %}{{ application.callback_domain }}{% endif %}`

But always this condition falls in else statement.Any suggestion?

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [June 30, 2025, 8:53pm UTC](https://community.auth0.com/t/email-verification-redirectto-url/187479/3 "2025-06-30T20:53:02Z")

</div>

Hi there!

Welcome back to the Auth0 Community!

Thank you for posting your question. Your condition statement is ok, but the reason why it’s not working may be due to the full URL format that includes the protocol (e.g., `http://localhost` or `https://localhost`. Try to edit your condition to this:

```auto
{% if application.callback_domain contains 'localhost' %}
    https://localhost:3001
{% else %}
    {{ application.callback_domain }}
{% endif %}

```

[https://community.auth0.com/t/how-user-redirection-works-after-email-verification/128879](https://community.auth0.com/t/how-user-redirection-works-after-email-verification/128879)

Thanks  
Dawid

---

<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:** [July 14, 2025, 8:53pm UTC](https://community.auth0.com/t/email-verification-redirectto-url/187479/4 "2025-07-14T20:53:39Z")

</div>

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