I have to different domains registered in godaddy. i have created an A record for both pointing towards the IP address of my digital ocean droplet, however, one of the domains is just redirecting to the other. i want to be able to access my message board with either domain - without redirecting. is this possible? what do i need to do?
סיכום מבוסס בינה מלאכותית
The discussion explores whether two domains can point to the same Discourse installation without redirecting. Mie_Goreng asks about having two domains (via A records) pointing to a DigitalOcean droplet, but one redirects to the other. itsbhanusharma questions the use case, noting Discourse won’t load properly on the second domain. schleifer confirms it’s not possible for a single Discourse instance to support two domains, as there must be one official hostname. However, adrelanos shares a workaround using a custom plugin and nginx subs_filter to achieve this, though it’s hacky and may break things. The use case is providing a secondary .onion domain for Tor users, leveraging features like Onion Location and alt-svc for enhanced privacy and encryption. pfaffman notes SEO concerns, but adrelanos dismisses them, suggesting X-Robots-Tag: noindex for the .onion domain. The topic references related discussions on supporting multiple domains and onion services in Discourse.
Discourse won’t load properly on the 2nd domain even if you manage to get past the redirect.
What is the use case here? Why do you want to different domains to point to the same discourse as if it is a unique installation?
If you want two domains to both point to the same Discourse forum, it’s not possible – there must be a single official hostname.
If you want to run two Discourse instances on the same server, there are multiple ways to accomplish that.
It’s possible for me, although hacky. Don’t blame me if it breaks something for you. A site specific (non-generic) plugin was created:
GitHub - mig5/discourse-whonix-onion-host-support: load Whonix site on onion if used · GitHub
Appreciate comments.
That plugin does “most” (can’t quantify) of the work. For the rest I am using nginx subs_filter.
Though, CSP on secondary domain is getting into the way.
My use case: providing a secondary .onion domain. Quote
Onion Location
Website publishers now can advertise their onion service to Tor users by adding an HTTP header. When visiting a website that has both an .onion address and Onion Location enabled via Tor Browser, users will be prompted about the onion service version of the site and will be asked to opt-in to upgrade to the onion service on their first use.
If you are a developer, learn how to enable onion-location in your onion service.
Another cool use case is
alt-svc (related to cloudflare onion).
.onion is also useful for non-location hidden, public servers. It’s an alternative means of end-to-end (or Tor to Tor) encryption that doesn’t rely on SSL/TLS certificate authorities. Onions can also be made fast using server side using HiddenServiceNonAnonymousMode 1, HiddenServiceSingleHopMode 1 and client side using Tor2Web mode (single hop).
Good point but not worried about this. The secondary domain name (in my case .onion) could use HTTP header X-Robots-Tag: noindex.
Related:
Forcing hostname has broken support for Onion Services
Potential duplicate:
How to add a second domain name?
