# Discourse under 2 hostnames

**URL:** https://meta.discourse.org/t/discourse-under-2-hostnames/80160
**Category:** Support
**Created:** [February 9, 2018, 9:53am UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160 "2018-02-09T09:53:28Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Raphael\_Haase\_NL](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Raphael\_Haase\_NL](https://meta.discourse.org/u/Raphael_Haase_NL)
#### Post date: [February 9, 2018, 9:53am UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/1 "2018-02-09T09:53:28Z")

</div>

What happens if I run Discourse under two different hostnames, i.e. the very same instance is connected to 2 different network interfaces with different IP addresses and different host names, but it is the same Discourse behind the two?  
Will this break anything, apart from the email links?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 9, 2018, 9:58am UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/2 "2018-02-09T09:58:27Z")

</div>

> [@Raphael\_Haase\_NL](#):
>
> different IP addresses

“the same discourse” suggests you are running it on the same server.

This can be achieved with a single IP address.

There is nothing stopping you registering several domains and pointing them to the same IP …

---

<div class="post-metadata">

### Author: ![Raphael\_Haase\_NL](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Raphael\_Haase\_NL](https://meta.discourse.org/u/Raphael_Haase_NL)
#### Post date: [February 9, 2018, 9:59am UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/3 "2018-02-09T09:59:06Z")

</div>

Yes, but it has to be two different IP addresses and network interfaces for network configuration reasons.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 9, 2018, 10:01am UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/4 "2018-02-09T10:01:24Z")

</div>

Ah got you … so in essence this is the same question as:

Can I run Discourse behind two different web proxies?

I think this just went above my pay-grade! 🙂 I’ll let others chime in …

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [February 9, 2018, 11:19am UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/5 "2018-02-09T11:19:55Z")

</div>

It won’t necessarily break anything, if you do it right, but there’s plenty of ways you _could_ break it.

---

<div class="post-metadata">

### Author: ![Raphael\_Haase\_NL](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Raphael\_Haase\_NL](https://meta.discourse.org/u/Raphael_Haase_NL)
#### Post date: [February 9, 2018, 12:06pm UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/6 "2018-02-09T12:06:31Z")

</div>

Any pointers what I should avoid breaking?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 9, 2018, 12:50pm UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/7 "2018-02-09T12:50:37Z")

</div>

Google is going to punish you big time if it finds out.

All email will point users at a single instance

Highly recommend you don’t do this

---

<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: [February 9, 2018, 2:09pm UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/8 "2018-02-09T14:09:19Z")

</div>

What problem are you trying to solve by doing this?

---

<div class="post-metadata">

### Author: ![Raphael\_Haase\_NL](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Raphael\_Haase\_NL](https://meta.discourse.org/u/Raphael_Haase_NL)
#### Post date: [February 9, 2018, 3:20pm UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/9 "2018-02-09T15:20:40Z")

</div>

Some weird corporate network setup where they do not want to connect subnet A to subnet B. Both need to use the Discourse instance, but are apparently not meant to talk to each other, except through using Discourse.

---

<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: [February 9, 2018, 4:06pm UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/10 "2018-02-09T16:06:46Z")

</div>

One solution would be to have discoursehostname on Subnet A resolve to the subnet A address and have it resolve to subnet B on the other network. I think you might even be able to have discoursehostname resolve to both the subnet A and the subnet B addresses and the OS would figure out which one to connect to.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 9, 2018, 4:24pm UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/11 "2018-02-09T16:24:48Z")

</div>

Yeah what you want @Raphael_Haase_NL is called

> **[Split-horizon DNS](https://en.wikipedia.org/wiki/Split-horizon_DNS)**
>
> In computer networking, split-horizon DNS (also known as split-view DNS, split-brain DNS, or split DNS, or Mirage) is the facility of a Domain Name System (DNS) implementation to provide different sets of DNS information, usually selected by the source address of the DNS request.
> This facility can provide a mechanism for security and privacy management by logical or physical separation of DNS information for network-internal access (within an administrative domain, e.g., company) and access from...

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 15, 2020, 3:03am UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/12 "2020-05-15T03:03:36Z")

</div>



---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [May 15, 2020, 4:32am UTC](https://meta.discourse.org/t/discourse-under-2-hostnames/80160/13 "2020-05-15T04:32:17Z")

</div>


