# How do I restore Discourse under a different domain?

**URL:** https://meta.discourse.org/t/how-do-i-restore-discourse-under-a-different-domain/224028
**Category:** Self-hosting
**Created:** [April 12, 2022, 11:41am UTC](https://meta.discourse.org/t/how-do-i-restore-discourse-under-a-different-domain/224028 "2022-04-12T11:41:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hexworks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hexworks/32/256589_2.png) [@hexworks](https://meta.discourse.org/u/hexworks)
#### Post date: [April 12, 2022, 11:41am UTC](https://meta.discourse.org/t/how-do-i-restore-discourse-under-a-different-domain/224028/1 "2022-04-12T11:41:06Z")

</div>

I’m trying to migrate my Discourse installation to another server but I’d like to try it out first. I managed to install the new server, backup the old one and restore it to the new one and it seems to be working, but when I try to log in it redirects to the old domain. How can I fix 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: [April 12, 2022, 12:19pm UTC](https://meta.discourse.org/t/how-do-i-restore-discourse-under-a-different-domain/224028/2 "2022-04-12T12:19:09Z")

</div>

Restoring to the new server should be all that you need to do. Did you put the new domain in the `HOSTNAME` in the `app.yml`? Do you have some SSO configuration that’s doing a redirect? A theme that’s doing something? You can try safe-mode and/or `/u/admin-login`

---

<div class="post-metadata">

### Author: ![hexworks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hexworks/32/256589_2.png) [@hexworks](https://meta.discourse.org/u/hexworks)
#### Post date: [April 12, 2022, 12:20pm UTC](https://meta.discourse.org/t/how-do-i-restore-discourse-under-a-different-domain/224028/3 "2022-04-12T12:20:58Z")

</div>

Ok, I figured out that the new site worked, but the login api keys pointed to the old one. Thanks.

---

<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 12, 2022, 12:21pm UTC](https://meta.discourse.org/t/how-do-i-restore-discourse-under-a-different-domain/224028/4 "2022-05-12T12:21:35Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
