# File URLs broken after moving to a different domain

**URL:** <https://meta.discourse.org/t/file-urls-broken-after-moving-to-a-different-domain/35502>\
**Category:** Product Support\
**Created:** [November 12, 2015, 5:12pm UTC](https://meta.discourse.org/t/file-urls-broken-after-moving-to-a-different-domain/35502 "2015-11-12T17:12:38Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

[CharlesBarouch](/t/-/35502/1) reported that after migrating their Discourse server from `discourse.redacted.com` to `faq.redacted.local`, internal links were inconsistently broken. Some links updated correctly, while others still pointed to the old domain and failed. The user noted that manually editing posts resolved the issue, as the preview showed working relative links. [fefrei](/t/-/35502/2) suggested following the official domain change instructions found on Meta Discourse. [CharlesBarouch](/t/-/35502/3) confirmed that they had missed the necessary command-line steps. By entering the app container and running `discourse remap` followed by `rake posts:rebake`, the issue was resolved. [fefrei](/t/-/35502/2) is thanked for the guidance.

<div class="post-metadata">

**Author:** ![CharlesBarouch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charlesbarouch/32/48050_2.png) [@CharlesBarouch](https://meta.discourse.org/u/CharlesBarouch)\
**Post date:** [November 12, 2015, 5:12pm UTC](https://meta.discourse.org/t/file-urls-broken-after-moving-to-a-different-domain/35502/1 "2015-11-12T17:12:38Z")

</div>

We created our server as [discourse.redacted.com](http://discourse.redacted.com) and then changed it to faq.redacted.local.  
Some links show up as faq.redacted.local and the DO work.  
Some links show up as [discourse.redacted.com](http://discourse.redacted.com) and the don’t work.

If I edit the posts (A) the links work 100% of the time in the preview, and (B) the links are relative links in the post (i.e. they don’t specify either [discourse.redacted.com](http://discourse.redacted.com) or [discourse.redacted.com](http://discourse.redacted.com)).

All help appreciated.

---

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [November 12, 2015, 7:54pm UTC](https://meta.discourse.org/t/file-urls-broken-after-moving-to-a-different-domain/35502/2 "2015-11-12T19:54:02Z")

</div>

Did you follow these instructions?

> [@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 …

---

<div class="post-metadata">

**Author:** ![CharlesBarouch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charlesbarouch/32/48050_2.png) [@CharlesBarouch](https://meta.discourse.org/u/CharlesBarouch)\
**Post date:** [November 12, 2015, 8:11pm UTC](https://meta.discourse.org/t/file-urls-broken-after-moving-to-a-different-domain/35502/3 "2015-11-12T20:11:46Z")

</div>

This was the step I didn’t know about:

./launcher enter app  
discourse remap [talk.foo.com](http://talk.foo.com) [talk.bar.com](http://talk.bar.com)  
rake posts:rebake

Thanks! [Felix](https://meta.discourse.org/users/fefrei)

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [November 13, 2015, 2:52am UTC](https://meta.discourse.org/t/file-urls-broken-after-moving-to-a-different-domain/35502/4 "2015-11-13T02:52:44Z")

</div>

Closed on November 13, 2015, 2:52am UTC


