<@U04UQ68083H> I have set my ory/elements project ...
# ory-copilot
m
@chilly-king-10285 I have set my ory/elements project configuration with
default_redirect_url: "/"
but when registering I still get redirected to the default
/ui/welcome
. Why?
c
A message from kapa.ai
The behavior you're experiencing—being redirected to
/ui/welcome
after registration despite setting
default_redirect_url: "/"
in your Ory Elements project configuration—can occur because the Ory Elements configuration (
AccountExperienceConfiguration
) only affects the UI components in your frontend application. The actual redirect behavior after registration is controlled by your Ory Network or Ory Kratos backend configuration, not by the Elements project config alone. By default, Ory Network projects are set to redirect to the Ory Account Experience pages (such as
/ui/welcome
) after self-service flows like registration. To change this, you need to configure the redirect URLs in your Ory project's backend settings, not just in your frontend code. Specifically, you should set the post-registration redirect in your Ory Network or Kratos configuration, for example:
Copy code
yaml selfservice:   flows:     registration:       after:         default_browser_return_url: <https://your-app.com/>
Or, if you want to use a dynamic return URL, you can append a
?return_to=
parameter when initializing the registration flow, and ensure your domain is whitelisted in the Ory configuration:
Copy code
yaml selfservice:   allowed_return_urls:     - <https://your-app.com/>
The Ory Elements
default_redirect_url
is used by the UI components for their own navigation, but the backend (Ory Network/Kratos) ultimately controls where the browser is redirected after a flow completes. If the backend is not configured to redirect to your desired URL, it will fall back to the default Account Experience page (
/ui/welcome
) [Docs: Browser redirects and flow completion](https://www.ory.sh/docs/concepts/redirects#redirect-flows). Summary: You need to update your Ory backend (Ory Network or Kratos) configuration to set the correct post-registration redirect URL. The frontend
default_redirect_url
in Ory Elements does not override the backend's redirect behavior. If you have already set the backend configuration and still see this issue, there may be a misconfiguration or a bug. In that case, double-check your Ory Network project settings under "Browser Redirects" and ensure your custom UI URLs and redirect URLs are set correctly [Docs: Configure Ory to use your UI](https://www.ory.sh/docs/kratos/bring-your-own-ui/configure-ory-to-use-your-ui).
m
@chilly-king-10285 I don't see any "Browser redirects" settings in Ory Network. Don't see any URL path configuration options at all
c
A message from kapa.ai
I'm sorry, but the knowledge sources do not provide detailed, up-to-date information about the exact location or availability of "Browser Redirects" settings in the current Ory Network Console UI. However, several sources and GitHub issues reference a "Browser Redirects" section in the Ory Console, where redirect URLs for flows like registration and login can be configured. For example, users and Ory team members discuss configuring these settings in the Console UI, and screenshots are referenced, but the precise navigation steps or current UI layout are not described in the documentation provided [Add the ability to set an
after_verification_return_to
url param for the "Sign up" links in the default Ory Account Experience](https://github.com/ory/network/issues/228) [Configure browser redirects per custom domain](https://github.com/ory/network/issues/374). If you do not see these options, it could be due to changes in the Console UI, your project type, or your plan. The knowledge sources do not clarify this further. If you need help locating these settings, I recommend reaching out to Ory support or the Ory Community Slack for the most current guidance.