Showing different settings according to different domain

Hey there,

I have several online products, each of which I’d like to have its own online community. However, because these products are interoperable, many of my customers use multiple products simultaneously.

With that in mind, I want to use a single Discourse instance for all my products but display a different theme for the community based on the domain used to access it.

For example:

  • app1 → shows App1’s logo and colors
  • app2 → shows App2’s logo and colors

Additionally, since all threads are required to be tagged based on the product name, I’d like to hide threads with tags from other products. For instance, hide #app1 if you’re accessing app2.com.

This should occur unless the user opts to browse multiple communities at once.

I could use any help; however, I understand something like this might not be available out of the box. As a developer, I can create a plugin and write additional JavaScript code to make this happen.

I suppose the first obstacle is allowing the same Discourse instance to run on multiple domains. How do I get started with this?

Having the same information on multiple sites is an SEO and no-no. I don’t recommend it. I have a (I think broken, but I’ll fix it Real Soon Now) theme component that will change the home page depending on what group someone is in so you could set their group according to a custom field you get when they create their account to set their hole page to the category for their favorite product.

If your don’t care about having your site indexed, you can look at the web_only template that redirects and add to your yml to un-do that. I think that Setup Multisite Configuration with Let’s Encrypt and no Reverse Proxy offers an example.