# Domínios alterados - Não recebendo redirecionamentos

**URL:** https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225
**Category:** Support
**Created:** [Março 17, 2016, 7:12pm UTC](https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225 "2016-03-17T19:12:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [Março 17, 2016, 7:12pm UTC](https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225/1 "2016-03-17T19:12:45Z")

</div>

Hello i have recently changed domain successfully thanks to this Howto:

> [@Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-my-discourse/16098):
>
> bookmark This guide explains how-to change the domain name of your Discourse site, and includes information about setting up DNS changes, editing configuration files, updating site settings, and correcting social logins and post content to reflect your new domain name. warning This guide is for self-hosted Discourse instances that were installed using our [installation guide on GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md). If you are [hosted by Discourse](https://www.discourse.org/pricing), please see [Configure your domain name for hosted Discourse](https://meta.discourse.org/t/configure-your-domain-name-for-hosted-discourse/21827) for specific …

Changed the Domain from `https://animeforums.me` to `https://discuss.moe`  
When i go to [https://animeforums.me](https://animeforums.me) for a redirect i get this error.  
[Imgur: The magic of the Internet](https://i.imgur.com/FxbUuYH.png)

_Both had Lets-encrypt certs_  
Though [https://discuss.moe](https://discuss.moe) works perfectly. Anyway i could redirect it discuss.moe without cert errors?

---

<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: [Março 17, 2016, 7:20pm UTC](https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225/2 "2016-03-17T19:20:30Z")

</div>

You need to have the old cert for the old domain name still configured since the redirect happens after the ssl connection is made. If you still have the old cert keys you could configure a web server (probably easiest to make it a different container or even a separate site) to be the old name and redirect to the new one.

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [Março 17, 2016, 7:23pm UTC](https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225/3 "2016-03-17T19:23:08Z")

</div>

I have a backup of old certs, by uploading them to the existing ones or how do i configure that?

---

<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: [Março 17, 2016, 7:42pm UTC](https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225/4 "2016-03-17T19:42:12Z")

</div>

This is far from a copy-and-paste solution, and not for the faint of heart, but here are some pieces of the puzzle:

```
./launcher enter app
cd /etc/nginx/conf.d

```

Then create a animeforums.conf that points to the new keys. Start on step 5 of these instructions at [Digital Ocean](https://www.digitalocean.com/community/tutorials/how-to-set-up-multiple-ssl-certificates-on-one-ip-with-nginx-on-ubuntu-12-04)

and add:

```plaintext
   rewrite (.*) https://discuss.moe$1 permanent;

```

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [Março 17, 2016, 9:01pm UTC](https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225/5 "2016-03-17T21:01:45Z")

</div>

I applied another dirty trick to solve this without touching nginx config of discourse or host.

Solved.

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [Março 18, 2016, 3:14am UTC](https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225/6 "2016-03-18T03:14:19Z")

</div>

This is what I did. Moved [animeforums.me](http://animeforums.me) dns to cloudflare and enabled ssl over there. It solved the problem

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [Junho 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/changed-domains-not-getting-redirects/41225/7 "2024-06-08T12:45:50Z")

</div>

Este tópico foi fechado automaticamente após 3004 dias. Novas respostas não são mais permitidas.
