Base solution for your next web application
Open Closed

Multi tenancy domain format to support multiple domains #12090


User avatar
0
joynext created

I have one server hosting and I would like to host and support multiple domain name... e.g. mydomain.com and yourdomain.com how do I change this to support?

"App": { "WebSiteRootAddress": "http://mydomain.com/", "MultiTenancy": { "DomainFormat": "{0}.mydomain.com", "DomainName": "mydomain.com" },


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team
  • User Avatar
    0
    joynext created

    Thank you, can you me an example how to change my appsettings?

    will it be?

    "App": { "WebSiteRootAddress": "http://mydomain.com/", "MultiTenancy": { "DomainFormat": "{0}.mydomain.com;{0}.yourdomain.com", "DomainName": "mydomain.com" },

    Also where should we inject and call? should we add this new class? https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/MultiTenancy/DomainTenantResolveContributor.cs#L43C80-L43C81

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @joynext

    You don't have to do anything else, it should work like this when you deploy your app to mydomain.com and yourdomain.com.

  • User Avatar
    0
    joynext created

    OK thanks. it looks like it worked!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Great :)