# Wie unterbindet man die automatische Weiterleitung für eine einzelne Instanz auf zwei Domains?

**URL:** https://meta.discourse.org/t/how-to-cancel-auto-redirecting-when-serving-a-single-instance-on-two-domains/271825
**Category:** Self-hosting
**Created:** [17. Juli 2023 um 08:50 UTC](https://meta.discourse.org/t/how-to-cancel-auto-redirecting-when-serving-a-single-instance-on-two-domains/271825 "2023-07-17T08:50:05Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [17. Juli 2023 um 10:20 UTC](https://meta.discourse.org/t/how-to-cancel-auto-redirecting-when-serving-a-single-instance-on-two-domains/271825/2 "2023-07-17T10:20:11Z")

</div>

Ich kann das auf meinem Handy nicht erkennen.

Sie können in der SSL-Vorlage nachsehen, was die Weiterleitung hinzufügt, und dann ähnliche Befehle hinzufügen, um sie zu entfernen. Ich glaube, dass [Setup Multisite Configuration with Let’s Encrypt and no Reverse Proxy](https://meta.discourse.org/t/setup-multisite-configuration-with-lets-encrypt-and-no-reverse-proxy/175285) die Weiterleitung entfernt.

> [@pfaffman](#):
>
> ```plaintext
> # do not redirect all hosts back to the main domain name
> - replace:
> filename: "/etc/nginx/conf.d/discourse.conf"
> from: /if (\$http_host[^\}]*\}/m
> to: ""
> - replace:
> filename: "/etc/nginx/conf.d/discourse.conf"
> from: /return 301.*$/
> to: "return 301 https://$host$request_uri;"
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/how-to-cancel-auto-redirecting-when-serving-a-single-instance-on-two-domains/271825)._
