# Do I need to rebuild when my domain name changes?

**URL:** https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212
**Category:** Support
**Created:** [31 במרץ,‏ 2017,‏ 1:51am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212 "2017-03-31T01:51:09Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![malcolmjr414](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/malcolmjr414/32/203897_2.png) [@malcolmjr414](https://meta.discourse.org/u/malcolmjr414)
#### Post date: [31 במרץ,‏ 2017,‏ 1:51am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/1 "2017-03-31T01:51:09Z")

</div>

Sorry for restarting an old thread. But my question is can you use Discourse in a main directory? e.g. `example.com` (I have it like this)? Because there are images which are not showing up because they are using the url (`http://discourse.example.com/blah/blah`).

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [31 במרץ,‏ 2017,‏ 2:06am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/2 "2017-03-31T02:06:36Z")

</div>

Sounds like you have your hostname improperly defined then… (in your app.yml – make sure you do a `./launcher rebuild app` after changing it)

---

<div class="post-metadata">

### Author: ![malcolmjr414](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/malcolmjr414/32/203897_2.png) [@malcolmjr414](https://meta.discourse.org/u/malcolmjr414)
#### Post date: [31 במרץ,‏ 2017,‏ 2:08am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/3 "2017-03-31T02:08:18Z")

</div>

Awesome! I’ve changed it just don’t know how to rebuild it because I enter it and it just keeps creating a new line lol

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [31 במרץ,‏ 2017,‏ 2:14am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/4 "2017-03-31T02:14:01Z")

</div>

you should be in /var/discourse and then run that command, be sure to have the entire command

`./launcher rebuild app`

---

<div class="post-metadata">

### Author: ![malcolmjr414](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/malcolmjr414/32/203897_2.png) [@malcolmjr414](https://meta.discourse.org/u/malcolmjr414)
#### Post date: [31 במרץ,‏ 2017,‏ 2:17am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/5 "2017-03-31T02:17:36Z")

</div>

Below is what I’m seeing, do I save the file before I rebuild it?

 ![](https://global.discourse-cdn.com/meta/original/3X/d/a/dadbf2d78dbb73d7f8ac0348cc075976b38c1b0a.png)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [31 במרץ,‏ 2017,‏ 2:21am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/6 "2017-03-31T02:21:19Z")

</div>

Yes, you need to press CTRL + X to exit, it will ask you about saving.

---

<div class="post-metadata">

### Author: ![malcolmjr414](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/malcolmjr414/32/203897_2.png) [@malcolmjr414](https://meta.discourse.org/u/malcolmjr414)
#### Post date: [31 במרץ,‏ 2017,‏ 2:49am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/7 "2017-03-31T02:49:59Z")

</div>

I’m getting permission denied, so now I believe I need to change the file permissions, how and what do I change them to?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [31 במרץ,‏ 2017,‏ 2:51am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/8 "2017-03-31T02:51:15Z")

</div>

No, just use sudo.

`sudo nano containers/app.yml` (save your changes)  
`sudo ./launcher rebuild app`

---

<div class="post-metadata">

### Author: ![malcolmjr414](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/malcolmjr414/32/203897_2.png) [@malcolmjr414](https://meta.discourse.org/u/malcolmjr414)
#### Post date: [31 במרץ,‏ 2017,‏ 3:02am UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/9 "2017-03-31T03:02:16Z")

</div>

> [@Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-your-discourse/16098/40):
>
> sudo ./launcher rebuild app

That worked! Thank you

---

<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: [20 במאי,‏ 2019,‏ 2:44pm UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/10 "2019-05-20T14:44:15Z")

</div>



---

<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: [19 ביוני,‏ 2019,‏ 2:44pm UTC](https://meta.discourse.org/t/do-i-need-to-rebuild-when-my-domain-name-changes/60212/11 "2019-06-19T14:44:18Z")

</div>

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