Multi-tenancy with individual domain names for each tenant

Multi-tenancy with individual domain names for each tenant

I need to figure out how to apply a customers domain name, and branding to his individual tenancy in OSP.  The incoming Domain name needs to drive the Theme/CSS.  We have DNS control of the 3rd level domain.  I have reviewed the SEO URL Rules, but they are very limited in discussing Multi-Tenancy.

Thanks for any help

Allen Witters

You don't need/should to do that in SEO URL rules.
A better way to do it is to add a OnSessionStart in your Layout Module, or in your User Provider (if you have a custom one) and perform the TenantSwitch there when necessary based on the request url.

João Rosado
Thank you João, I will try working through this, how do I pick up whih Domain they are coming through on OSP?

We did exactly what Joao suggests. Look in the HttpRequestHandler extension, there are functions for determining the requested host name.

Warning: this becomes messy with SSL because each SSL domain name needs its own IP address. That's an HTTPS limitation, not an OutSystems one... if you use SSL, either be prepared to manage that, or switch them to a common domain name once they land at your site.