If i register domainABC.com and domainXYZ.com
is it possible to wire different domains up to point to specific tenant names? example: domainABC.com should map to tenantA.rootdomain.com (where aspzero code is hosted) domainXYZ.com should map to tenantB.rootdomain.com (where aspzero code is hosted)
2 Answer(s)
-
0
Do you want the first domain name (domainABC.com) to remain in the browser url bar or can the user be redirected to tenanta.rootdomain.com? If not, then you can do this in DNS using cnames. If you do then I am not sure how the mapping management would work.
-
0
Hi @Mdonogma,
You can write a custom tenant resolver, see <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy#determining-current-tenant">https://aspnetboilerplate.com/Pages/Doc ... ent-tenant</a>.
Basically you extract tenant name from current url like you want by a custom tenant resolver. After writing your class, you can add it to resolvers like this:
Configuration.MultiTenancy.Resolvers.Add<YourCustomTenantResolveContributor>();