Category subdomains - Same Discourse instance on different subdomains


(Michael) #1

Hey there, a quick followup to this solution.

I’d like to have the same Discourse instance on two different domains, so I can present info in context. E.g. multiple projects.

Each subdomain would:

  • have all the content
  • a vanity subdomain for the project
  • some javascript would forward to that project’s category if arriving at /

I tried this with a 2nd DNS A record, but the 2nd domain did a redirect to the 1st domain, then ran my JS - so neither the vanity subdomain or the forward worked.

Is there a way to get one Discourse install to respond to multiple domain names?
Does this mess up S3 assets and CDN?
Any other issues with this?

Thanks!

Mike


#2

Do you mean that you want the same content on both? Can you not just use a redirect?


(Michael) #3

Hey Hawk, I putting together a site to organize volunteers for a group of separate projects. Because the projects are loosly affiliated, Vanity URLs/subdomains would be nice.


#4

You’ll run into trouble having duplicate content on different domains though.


(Michael) #5

Hey @HAWK your comment would be alot more meaningful if you described the “trouble” :slight_smile:


(Jeff Atwood) #6

Google will penalize you heavily in search rankings for doing this.


(Christoph) #7

Does this apply even if you are just forwarding the subdomain to a specific category url, say bugs.discourse.org ==> https://meta.discourse.org/c/bug?


(Sam Saffron) #8

Google is very unlikely to penalize you for 301 redirects


(Christoph) #9

In that case, I wonder if discourse can help such redirects work smoothely on all browsers. I have used such a redirect in the past and it seemed to work fine until I used a different browser (I think it was IE or Edge) where I suddenly got some security warning (like: this site is not safe, do you really want to continue). My understanding was that this had to do with the requested domain not corresponding with the SSL certificate on the discourse server.

My thinking is that this shouldn’t happen since the redirect happens before the discourse server is even contacted, but the fact that some browsers issue that kind of warning is worrying and I wonder what can be done about it.

I realy don’t know the intricacies of the technology concerned, but perhaps one way could be to allow admins to specify other subdomain for which it should also obtain Let’s Encrypt! certificates?