# Determining Subdomain Redirect After Login, Integrating SAML?

**URL:** <https://community.auth0.com/t/determining-subdomain-redirect-after-login-integrating-saml/47767>\
**Category:** Get Help\
**Created:** [August 10, 2020, 7:06pm UTC](https://community.auth0.com/t/determining-subdomain-redirect-after-login-integrating-saml/47767 "2020-08-10T19:06:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevem](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stevem/32/12715_2.png) [@stevem](https://community.auth0.com/u/stevem)\
**Post date:** [August 10, 2020, 7:06pm UTC](https://community.auth0.com/t/determining-subdomain-redirect-after-login-integrating-saml/47767/1 "2020-08-10T19:06:28Z")

</div>

Hello, totally new to SSO. Thank you for any help.

We have 50 clients, each with their application housed in their corresponding subdomain… **clientA. domain. com** , **clientB. domain. com** , **clientC. domain. com** , etc.

1. If _most_ clients are in the Auth0 database of users, how can I redirect user **james** to **clientA. domain. com** (and no other domain), user **linda** to **clientB. domain. com** (and no other domain), etc.?

- Does each subdomain need its own login page that “knows” what domain it came from, for purposes of redirect after user validation?
- If a user logs in using a single, standard Auth0 login page, how can we determine what subdomain to send the user to after validation? I’ve read that metadata can house user data, but we’d like to not write metadata to a user’s account. Does the ability to write metadata require the Enterprise plan? Plus, it affects #2, below.

1. If some clients already use Okta (Auth0 seems easier for us to integrate so far), we don’t know who those users are. If their user logs in using Okta’s login screen, then Okta should validate them – we need to redirect that Okta-housed user through Auth0, and then figure out what subdomain to send the user to (and no other subdomain). Can you describe how we can make this process work?

Thank you for any help.

---

<div class="post-metadata">

**Author:** ![stevem](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stevem/32/12715_2.png) [@stevem](https://community.auth0.com/u/stevem)\
**Post date:** [August 25, 2020, 2:13am UTC](https://community.auth0.com/t/determining-subdomain-redirect-after-login-integrating-saml/47767/3 "2020-08-25T02:13:37Z")

</div>

I’m just posting again with this architecture question, above (and, I’ve tried reading Auth0’s architecture articles, but I’m still lost given our intended use). Thank you for any responses.

---

<div class="post-metadata">

**Author:** ![sgo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgo/32/13789_2.png) [@sgo](https://community.auth0.com/u/sgo)\
**Post date:** [September 2, 2020, 4:34pm UTC](https://community.auth0.com/t/determining-subdomain-redirect-after-login-integrating-saml/47767/4 "2020-09-02T16:34:06Z")

</div>

Hi @stevem ,

1.)You would want some mechanism to determine which redirect\_uri to pass with the authorize request, this is the only way to change where the use goes (directly) after authentication, but further redirections could be put in place after that.

One way would be to have vanity URLs for each client, for example clientA would go to [login.domain.com/clientA](http://login.domain.com/clientA) , (or it could be a querystring parameter). This vanity URL would then be able to redirect the user to the authorize endpoint with the correct redirect\_uri for that customer and application.

You can further/alternatively control this using state or cookies/browser session on your applications side, as mentioned here: [Redirect Users](https://auth0.com/docs/users/redirect-users-after-login)

You may also want to review this documentation here: [Multi-Tenant Applications Best Practices](https://auth0.com/docs/design/using-auth0-with-multi-tenant-apps) - there are a couple ways shown there to handle multiple groups of users.

2.) You would need to do the same as mentioned in 1.) for the redirection part, and get the users to login to Okta by going to Auth0 first, i.e. don’t use IDP initiated flows. Enterprise connections support home realm discovery, which can send the user to the relevant Enterprise IDP based on their email domain. There is some more detail on this here: [Select from Multiple Connection Options](https://auth0.com/docs/libraries/lock/selecting-from-multiple-connection-options#using-email-domains-with-enterprise-connections)

You could also specify the connection parameter in your authorize URLs, to fast track the user to the relevant IDP - [Authentication API Explorer](https://auth0.com/docs/api/authentication#enterprise-saml-and-others-)

Either way, you would want your Okta users to use an SP initiated flow (i.e. Auth0 authorize url), and you could provide such a link in an Okta portal for example.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [June 12, 2025, 5:41pm UTC](https://community.auth0.com/t/determining-subdomain-redirect-after-login-integrating-saml/47767/5 "2025-06-12T17:41:59Z")

</div>

Hi team! 👋

This is a heads-up that we’re hosting an [Ask Me Anything (AMA) session 📢 on our new Multiple Custom Domains (MCD) capability](https://community.auth0.com/t/june-25-auth0-community-ask-me-anything-multiple-custom-domains/187776). Our Platform Infrastructure Product Manager, Pawan Bhardwaj, will be live on **June 25, 2025, from 9 AM to 11 AM PST** 🗓 to answer all your questions—from high-level strategy to specific technical implementation.

You can submit your questions from **now until June 24** ✏, and we’ll provide detailed written answers during the live event.

If you have any questions about managing multiple brands 🏢, creating tailored login experiences 🎨, or simplifying your architecture with a single tenant ⚙, feel free to drop them in [this thread](https://community.auth0.com/t/june-25-auth0-community-ask-me-anything-multiple-custom-domains/187776). We look forward to your questions and seeing you there!

[June 25 Auth0 Community Ask Me Anything: Multiple Custom Domains](https://community.auth0.com/t/june-25-auth0-community-ask-me-anything-multiple-custom-domains/187776)

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [July 30, 2025, 10:15am UTC](https://community.auth0.com/t/determining-subdomain-redirect-after-login-integrating-saml/47767/6 "2025-07-30T10:15:34Z")

</div>

Hi everyone! 👋

**Multiple Custom Domains (MCD)** support in a single tenant is now available in **Early Access (EA)**, only for Enterprise customers. This capability lets you:

- 🔑 Securely manage multiple branded domains under one Auth0 tenant
- 🚀 Improve user trust with seamless, white‑labeled login experiences
- 🛡 Host customer‑specific domains to meet data residency and regulatory requirements

To learn more, check out the detailed documentation:  
[https://auth0.com/docs/customize/custom-domains/multiple-custom-domains](https://auth0.com/docs/customize/custom-domains/multiple-custom-domains)

For detailed use cases and best practices, explore our guides here:

- Use Cases: [https://auth0.com/docs/customize/custom-domains/multiple-custom-domains/mcd-use-cases](https://auth0.com/docs/customize/custom-domains/multiple-custom-domains/mcd-use-cases)
- Best Practices: [https://auth0.com/docs/customize/custom-domains/multiple-custom-domains/mcd-best-practices](https://auth0.com/docs/customize/custom-domains/multiple-custom-domains/mcd-best-practices)

If you’re interested in using this feature, please contact your Sales Executive or Technical Account Manager or open a support ticket through the Auth0 Support Center.

Thank you for being part of the Auth0 Community! 🎉

Dawid

---

<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:** [August 13, 2025, 10:15am UTC](https://community.auth0.com/t/determining-subdomain-redirect-after-login-integrating-saml/47767/7 "2025-08-13T10:15:45Z")

</div>

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