Update the A record for the domain(s) you want to redirect to original domain.
It helped and so am sharing. If somebody trying to change the A Record for the route domain. Don’t use * in the hostname but @ in the hostname of Digitalocean DNS management.
Why are you using digital ocean for DNS? It would be out recommendation to stick with your registrar’s DNS unless you’re looking to use specific features which require moving, such as Cloudflare or Route 53.
Not sure what’s the disadvantage of that. But the reason why i do it is using the registrar only for buying domain and leave that alone. Then manage everything in DO. Also their interface looks easy to manage multiple domains and setup.
If I redirect my naked domain example.com -> www.example.com using the instructions here, I have problems with my ssl certificate not being valid when going to example.com.
If I use NakedSSL to redirect example.com -> www.example.com. My cookies and therefore topics read seems to not display accurately.
What is the solution? I am using a docker install on digital ocean.
You must redirect to the “correct” form that you have certs for. Content cannot be at multiple domains simultaneously, that is a configuration error, and Google will ding you for duplicate content.
Ok. I did get it working using the instructions as above. As you said my certificate probably hadn’t completely switched from the naked domain to the www domain.
However, I still have issues with discourse not remembering what I have read when I return to the root of the site. If I go straight to the root, all messages are shown as unread until I follow the latest and top links. Any idea what may be causing this behaviour?
I suppose it works fine for you now; as the links mentioned are redirecting fine. I suppose you had to specify ssl_certificate and ssl_certificate_key. Can you please share your updated settings?
But visitors of hotelbobbygg.xyz get the certificate error (and can’t add exception either). I’ve even tried incognito mode.
I was wondering, in the path line (i.e. the line just next to ‘-file’), do I only need to give some name such as ‘some_name.conf’ or do I need to create that same named file ‘some_name.conf’ somewhere, under some /etc/path?
Das ist ein guter Anfang. Das Problem, auf das ich hier stoße, ist, dass die Root-Domains (www und ohne www) im Docker-Container-Build keine von Let’s Encrypt zugewiesenen SSL-Zertifikate haben. Daher erhalten wir bereits vor der Weiterleitung einen HTTPS-Fehler vom Browser. Richtig? Wie können wir den Root-Domains (www und ohne www) SSL hinzufügen, damit diese Weiterleitung tatsächlich funktioniert?
Schau dir Set up Let’s Encrypt with multiple domains / redirects - #24 an. Ich habe das gestern verwendet, um die www.example.com-Seite, die ich eingerichtet habe, so einzustellen, dass sie https://example.com korrekt weiterleitet. Es hat wie erwartet funktioniert.
Ist das im Jahr 2021 noch alles gültig? Ich möchte eine alte URL auf meinen neuen Host umleiten, aber mein Discourse-Setup ist eine https://-Seite. Es sieht so aus, als ob die Anweisungen hier für eine http://-Seite (Port 80?) sind.
Wäre jemand so freundlich, mir die notwendigen Schritte zu zeigen, um Folgendes umzuleiten: https://discourse.oldsite.com zu https://discourse.newsite.com
Ich benutze DO, ich nehme an, ich muss auch einen CNAME-Eintrag in meinen Netzwerkeinstellungen hinzufügen, der die alte Seite auf die neue verweist?
Muss ich auch etwas mit LetsEncrypt machen?
Vielen Dank für Ihre Hilfe!
Das verknüpfte Thema sollte funktionieren. Es erklärt, wie man Dinge zu app.yml hinzufügt, die Let’s Encrypt dazu veranlassen, ein Zertifikat für beide Subdomänen zu erhalten. Ja, Sie müssen einen CNAME verwenden oder anderweitig dafür sorgen, dass beide Domains auf Ihr Droplet aufgelöst werden.
Vielen Dank für Ihre schnelle Antwort.
Ich muss also NUR die Schritte ausführen, die in Ihrem vorherigen Beitrag detailliert sind ( Let’s Encrypt mit mehreren Domains einrichten ), und nicht auch die Sachen des OP? (Der OP bezieht sich nur auf Port 80)
Mein aktueller Domainname ist mydomain.tld1. Nach dem Rebuild funktioniert mydomain.tld1 einwandfrei, aber wenn ich versuche, auf mydomain.tld2 zuzugreifen, wird ERR_CERT_COMMON_NAME_INVALID angezeigt und umgekehrt (wenn ich tld1 und tld2 in der .yml-Datei vertausche).
Ich glaube, dass sich etwas in der Let’s Encrypt-Vorlage geändert hat und dass etwas anderes benötigt wird, aber ich habe noch keine Zeit investiert, um das vollständig zu debuggen.
Ich habe eine Discourse-Instanz auf forum.mysite.ca über Digital Ocean eingerichtet. Ich möchte mysite.ca auf forum.mysite.ca umleiten und dachte, ich hätte es zum Laufen gebracht, aber wenn ich zu mysite.ca gehe, erscheint diese Warnmeldung:
"Ihre Verbindung ist nicht privat
Angreifer versuchen möglicherweise, Ihre Informationen von mysite.ca zu stehlen (z. B. Passwörter, Nachrichten oder Kreditkarten). Mehr erfahren
NET::ERR_CERT_COMMON_NAME_INVALID"
mit einem “Erweitert”-Button, der einen Link mit dem Text “Weiter zu mysite.ca (unsicher)” hat.
Ich suche schon seit einer Woche nach der Antwort und habe große Schwierigkeiten. Jede Hilfe oder Links wären hilfreich.