<@U04UQ68083H> Hi, we would like to bring our own ...
# ory-copilot
f
@chilly-king-10285 Hi, we would like to bring our own UI. Can my own UI and ory both run on the same domain?
c
A message from kapa.ai
Yes, you can configure Ory to use your own UI and both can run on the same domain. To define the paths where Ory calls your custom UI, you can go to the Ory Console → User Interface. This view allows you to define the URLs of UI views for every self-service flow. You can use relative or absolute paths to point to the desired UI. Unless you set a custom UI base URL, relative links always use your SDK Configuration URL as the base. All paid Ory Network plans allow you to add a custom domain to your project. After adding a custom domain, you can also set up a base URL for all custom UI views. This is a great way to make Ory work with your existing deployment without adjustments, as you can use the combination of the base URL and relative URLs to point Ory to UI screens for operations such as login or registration you are already hosting. When you define a custom UI base URL, you lose access to the Ory Account Experience. The custom UI base URL takes precedence over the SDK Configuration URL. You can toggle the "Enable the Account Experience welcome page" setting to hide the default "welcome" screen that isn't intended for end-users. For more details, you can refer to the [Ory Documentation](https://www.ory.sh/docs/kratos/bring-your-own-ui/configure-ory-to-use-your-ui).
f
@chilly-king-10285 So I can host my UI on e.g. auth.test.com/ui/ and the ory network still runs on auth.test.com ?
c
A message from kapa.ai
Yes, you can host your UI on a subdomain (like `auth.test.com/ui/`) and have Ory run on the main domain (
<http://auth.test.com|auth.test.com>
). Ory Kratos and your UI must be hosted on the same top-level domain. For example,
<http://kratos.bar.com|kratos.bar.com>
and
<http://ui.bar.com|ui.bar.com>
will work, as will
<http://kratos.bar.com|kratos.bar.com>
and
<http://bar.com|bar.com>
. However,
<http://kratos.bar.com|kratos.bar.com>
and
<http://not-ar.com|not-ar.com>
will not work. Once the settings are stored, the browser is HTTP 303 redirected to the flow's configured UI URL (for example
selfservice.flows.login.ui_url
), appending the flow ID as the
flow
URL Query Parameter. Also included are HTTP cookies such as Anti-CSRF cookies. For more details, you can refer to the [Ory Documentation](https://www.ory.sh/docs/kratos/self-service#initialization-and-redirect-to-ui).