In a discussion about running a single Discourse instance across multiple subdomains for vanity URLs (e.g., for separate projects), Michael321 seeks a way to serve the same content under different domains without redirects breaking vanity URLs or JavaScript-based category forwarding. HAWK warns of duplicate content issues, which codinghorror clarifies could lead to Google search penalties. tophee asks if this applies when using 301 redirects to specific category URLs (e.g., bugs.discourse.org → meta.discourse.org/c/bug), to which sam replies Google typically doesn’t penalize 301s. However, tophee raises a concern about browser security warnings (e.g., in IE/Edge) when redirecting from a subdomain not covered by the server’s SSL certificate — even though the redirect happens before reaching Discourse. They suggest Discourse could allow admins to request Let’s Encrypt certificates for additional subdomains to avoid such warnings. The core issue revolves around balancing vanity URLs, SEO, and browser/SSL compatibility without breaking Discourse’s behavior or risking penalties.
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?
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.
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?