# Redirect to external domain on logout

**URL:** <https://community.auth0.com/t/redirect-to-external-domain-on-logout/85091>\
**Category:** Get Help\
**Tags:** redirect, logout, nextjs, auth0\
**Created:** [June 14, 2022, 1:46pm UTC](https://community.auth0.com/t/redirect-to-external-domain-on-logout/85091 "2022-06-14T13:46:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cameron3](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cameron3/32/38016_2.png) [@cameron3](https://community.auth0.com/u/cameron3)\
**Post date:** [June 14, 2022, 1:46pm UTC](https://community.auth0.com/t/redirect-to-external-domain-on-logout/85091/1 "2022-06-14T13:46:13Z")

</div>

Hey all,

I’m currently writing an application where we’d like to redirect users to an external site on logout, for example they login and use “httpsL//thisdomain.com” but once they logout we’d like to send them to “\_[https://someotherdomain.com](https://someotherdomain.com)”. I have “\_[https://someotherdomain.com](https://someotherdomain.com)” in my Allowed Logout URLs but on pressing logout am given the following error (during development, we’re not deployed yet):

> **invalid\_request** : The “returnTo” querystring parameter “[http://localhost:3000](http://localhost:3000)” is not defined as a valid URL in “Allowed Logout URLs”. To add a new URL, please do it here: [https://manage.auth0.com/#/applications/](https://manage.auth0.com/#/applications/)\<_id_\>/settings

---

<div class="post-metadata">

**Author:** ![cameron3](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cameron3/32/38016_2.png) [@cameron3](https://community.auth0.com/u/cameron3)\
**Post date:** [June 15, 2022, 10:33am UTC](https://community.auth0.com/t/redirect-to-external-domain-on-logout/85091/2 "2022-06-15T10:33:51Z")

</div>

Just to reply to this to say I did find a fix for this, though I’ve slept since I made this post (waiting for it to be approved), I think the solution was just to add the other domain to tenant settings which I didn’t realise were in a separate section of the dashboard

---

<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:** [January 6, 2023, 9:51pm UTC](https://community.auth0.com/t/redirect-to-external-domain-on-logout/85091/3 "2023-01-06T21:51:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [January 6, 2023, 9:52pm UTC](https://community.auth0.com/t/redirect-to-external-domain-on-logout/85091/4 "2023-01-06T21:52:36Z")

</div>

HI @cameron3,

Sorry about the delayed response. Thank you for sharing your solution with our community! 👍
