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

**URL:** https://meta.discourse.org/t/show-hide-forums-based-on-the-domain-shared-forum-via-cname/133698
**Category:** Support
**Created:** [18 november 2019 om 15:20 UTC](https://meta.discourse.org/t/show-hide-forums-based-on-the-domain-shared-forum-via-cname/133698 "2019-11-18T15:20:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![tommy87](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tommy87](https://meta.discourse.org/u/tommy87)
#### Post date: [18 november 2019 om 15:20 UTC](https://meta.discourse.org/t/show-hide-forums-based-on-the-domain-shared-forum-via-cname/133698/1 "2019-11-18T15:20:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [18 november 2019 om 15:26 UTC](https://meta.discourse.org/t/show-hide-forums-based-on-the-domain-shared-forum-via-cname/133698/2 "2019-11-18T15:26:26Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![tommy87](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tommy87](https://meta.discourse.org/u/tommy87)
#### Post date: [18 november 2019 om 15:34 UTC](https://meta.discourse.org/t/show-hide-forums-based-on-the-domain-shared-forum-via-cname/133698/3 "2019-11-18T15:34:31Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [18 november 2019 om 15:38 UTC](https://meta.discourse.org/t/show-hide-forums-based-on-the-domain-shared-forum-via-cname/133698/4 "2019-11-18T15:38:03Z")

</div>

> [@tommy87](#):
>
> I’d be willing to put in the config time if I had some place to check out some documentation

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

> [@tommy87](#):
>
> 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?

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)](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045)

---

<div class="post-metadata">

### Author: ![tommy87](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tommy87](https://meta.discourse.org/u/tommy87)
#### Post date: [18 november 2019 om 15:45 UTC](https://meta.discourse.org/t/show-hide-forums-based-on-the-domain-shared-forum-via-cname/133698/5 "2019-11-18T15:45:20Z")

</div>

Thank you for pointing me to this.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [18 december 2019 om 15:52 UTC](https://meta.discourse.org/t/show-hide-forums-based-on-the-domain-shared-forum-via-cname/133698/6 "2019-12-18T15:52:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
