<@U04UQ68083H> when a user has an active session b...
# ory-copilot
p
@chilly-king-10285 when a user has an active session but a recovery lik is generated, ory-network redirects the user to the /ui/welcome page. can I change this redirect?
c
A message from kapa.ai
Yes, you can change the default redirect behavior in Ory. By default, all redirects will go to the
[publish-url]
. However, you can change this behavior using the
--default-redirect-url
flag. For example:
Copy code
bash $ ory --project <your-project-slug> \       --default-redirect-url /welcome \       <http://127.0.0.1:3000> \       <https://ory.example.org>
In this example, all redirects happening e.g. after login will point to
/welcome
instead of
/
unless you have specified custom redirects in your Ory configuration or in the flow's
?return_to=
query parameter. Please note that the Post-Recovery redirect isn't supported and will automatically redirect the user to the Settings UI URL. You should use the Post-Settings redirect for Post-Recovery flows. Sources: - [Ory Proxy Redirects](https://www.ory.sh/docs/cli/ory-proxy#redirects) - [Verification, recovery, and logout](https://www.ory.sh/docs/concepts/redirects#verification-recovery-and-logout)