# Como adicionar um segundo nome de domínio?

**URL:** https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371
**Category:** Support
**Created:** [17 Fevereiro , 2019 12:17 UTC](https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371 "2019-02-17T12:17:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Tommy\_Trojan](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@Tommy\_Trojan](https://meta.discourse.org/u/Tommy_Trojan)
#### Post date: [17 Fevereiro , 2019 12:17 UTC](https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371/1 "2019-02-17T12:17:47Z")

</div>

Greetings, I am wondering how to keep a second domain pointing to the same instance?

I have set up a discourse instance with domain name [https://firstdomain](https://firstdomain), for some reason, I have to set up a second domain [https://seconddomain](https://seconddomain) pointing to the same instance and keep it in the address bar when people visit it.

I tried all I can but everytime visiting the seconddomain, it will be redirected to firstdomain in the address bar. Any help would be greatly appreciated. Thanks.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [17 Fevereiro , 2019 12:31 UTC](https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371/2 "2019-02-17T12:31:13Z")

</div>

That’s on purpose.

[https://github.com/discourse/discourse/commit/e7001f879a2cd87cba8dbfc5bb4e0f4f9023471c](https://github.com/discourse/discourse/commit/e7001f879a2cd87cba8dbfc5bb4e0f4f9023471c)

---

<div class="post-metadata">

### Author: ![Tommy\_Trojan](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@Tommy\_Trojan](https://meta.discourse.org/u/Tommy_Trojan)
#### Post date: [17 Fevereiro , 2019 13:57 UTC](https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371/3 "2019-02-17T13:57:57Z")

</div>

Thank you for your reply. so is there any other way to achieve the same goal?  
Like ngnix reverse proxy?

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [17 Fevereiro , 2019 14:32 UTC](https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371/4 "2019-02-17T14:32:45Z")

</div>

A reverse proxy would require nasty voodoo content rewriting. I think the only sane way is a plugin: [Forcing hostname has broken support for Onion Services - #4 by sam](https://meta.discourse.org/t/forcing-hostname-has-broken-support-for-onion-services/102419/4)

We can take this on as a project if you’re interested.

---

<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 Fevereiro , 2019 21:14 UTC](https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371/5 "2019-02-17T21:14:03Z")

</div>

There are also SEO reasons not to have two domains serve the same content.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [17 Fevereiro , 2019 21:32 UTC](https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371/6 "2019-02-17T21:32:25Z")

</div>

Discourse inserts link rel=“canonical” tags to the primary hostname so that already has been mitigated.

---

<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: [13 Março , 2022 02:32 UTC](https://meta.discourse.org/t/how-to-add-a-second-domain-name/109371/7 "2022-03-13T02:32:36Z")

</div>


