Show/hide forums based on the domain? (Shared forum via CNAME)

AI-generated summary

tommy87 wants to host one forum on multiple websites using CNAME records and display specific forum groups based on the domain header. However, Falco states that Discourse enforces one hostname, making this an unsupported configuration. As an alternative, Falco suggests using group membership to control category visibility. Falco further explains that users can be automatically added to groups based on a modified sign-up link using the SSO protocol, which is documented at Official Single Sign-On for Discourse (SSO).

I’d like to host one forum on one website and use CNAME records to point two other websites to my one hosted forum. Is there any documentation I can read that would help me better understand how to show and hide specific forum groups based on the domain header and the specific ruby/discourse architecture I will need to modify to do so?

Thanks for your help with this. Totally new to discourse and ruby but excited to dig in.

-Tommy

Discourse enforces one hostname, so this isn’t something that will work out of the box.

You can have a shared forum in a single domain, and control categories visibility using group membership.

Has anyone attempted to do this that you’re aware of? I’d be willing to put in the config time if I had some place to check out some documentation that would begin to help me understand where to start.

The second option may work as well if I can find a way to automatically put someone in group membership based a modified Sign Up link we provide on each specific site maybe?

Thanks for your guidance here.

Since this is an unsupported and unusual configuration there is no documentation.

This is the way to go and our SSO protocol comes with support for it out of the box. You can pass the group membership in the SSO payload. Documentation is Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)

Thank you for pointing me to this.