<@U04UQ68083H> Is it possible to run ory Kratos wi...
# ory-copilot
a
@chilly-king-10285 Is it possible to run ory Kratos with multiple domains, e.g. foo.com and bar.com
b
A message from kapa.ai
No, it is not possible to run Ory Kratos with multiple top-level domains such as
<http://foo.com|foo.com>
and
<http://bar.com|bar.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, but
<http://kratos.bar.com|kratos.bar.com>
and
<http://not-bar.com|not-bar.com>
won't work. This is because cookies, including the session cookie issued by Ory, are isolated in the browser per domain to prevent cross-site attacks. Therefore, there will be one session per domain. However, with the Multibrand feature enabled for your workspace, you can add multiple custom domains to each Ory Network project. This allows for a high degree of flexibility, where each of the domains serves its own set of UI views that have a common path makeup but different base URL. Please note that while a user can use the same account across multiple domains, they will need to authenticate separately on each domain. For more information, you can refer to the following sources: - [Advanced base URL, CSRF and session cookie settings](https://www.ory.sh/docs/kratos/guides/multi-domain-cookies) - [CSRF troubleshooting](https://www.ory.sh/docs/kratos/debug/csrf#common-issues) - [Set up custom domains](https://www.ory.sh/docs/guides/custom-domains) - [Configure Ory to use your UI](https://www.ory.sh/docs/kratos/bring-your-own-ui/configure-ory-to-use-your-ui#multiple-custom-domains) - [Initialize login flow](https://www.ory.sh/docs/kratos/self-service/flows/user-login#initialize-login-flow) - [Browser flows for client-side apps](https://www.ory.sh/docs/kratos/self-service#browser-flows-for-client-side-apps-single-page-apps-reactjs-angular-nextjs-) - [Multitenancy](https://www.ory.sh/docs/kratos/guides/multi-tenancy-multitenant) - [Quickstart Setup](https://www.ory.sh/docs/kratos/quickstart#setup) - [Session cookies](https://www.ory.sh/docs/kratos/guides/configuring-cookies#session-cookies)