# Do uploaded files use absolute links?

**URL:** https://meta.discourse.org/t/do-uploaded-files-use-absolute-links/11920
**Category:** Support
**Created:** [January 13, 2014, 11:11am UTC](https://meta.discourse.org/t/do-uploaded-files-use-absolute-links/11920 "2014-01-13T11:11:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Maomao](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maomao/32/16877_2.png) [@Maomao](https://meta.discourse.org/u/Maomao)
#### Post date: [January 13, 2014, 11:11am UTC](https://meta.discourse.org/t/do-uploaded-files-use-absolute-links/11920/1 "2014-01-13T11:11:40Z")

</div>

When I change my Discourse forum’s host, for instance rename the subdomain, uploaded files stop working. We’re still just testing so the only uploaded files are some avatars, which have now gone missing twice. I found the avatar link in the HTML source:

```
 PreloadStore.store("topic_list",{"users":[{"id":2,"username":"<some_user_name>","avatar_template":"//<old_forum_address>/uploads/default/avatars/xxx/xxx/xxxxxxxxxx/{size}.jpg"},

```

I have already updated the host address both in `config/discourse.conf` and in the forum settings, so I’m wondering if these links are stored with absolute URLs. Is there a way to update these links to use the new hostname? Am I just missing a setting somewhere?

It’s not a big deal in my case, just thought it was interesting and good to note.

---

<div class="post-metadata">

### Author: ![Maomao](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maomao/32/16877_2.png) [@Maomao](https://meta.discourse.org/u/Maomao)
#### Post date: [January 13, 2014, 11:15am UTC](https://meta.discourse.org/t/do-uploaded-files-use-absolute-links/11920/2 "2014-01-13T11:15:14Z")

</div>

One more similar issue after changing hostname.

I got a message saying: _There are new user signups waiting to be approved (or rejected) before they can access this forum. Please review them in the admin section._

The link used the old hostname and gave me a 404: `http://<old_hostname>/admin/users/list/pending/`

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [January 13, 2014, 11:22am UTC](https://meta.discourse.org/t/do-uploaded-files-use-absolute-links/11920/3 "2014-01-13T11:22:17Z")

</div>

Are you running latest? If so, run the `avatars:regenerate` rake task to fix this 😉

---

<div class="post-metadata">

### Author: ![Maomao](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maomao/32/16877_2.png) [@Maomao](https://meta.discourse.org/u/Maomao)
#### Post date: [January 13, 2014, 12:05pm UTC](https://meta.discourse.org/t/do-uploaded-files-use-absolute-links/11920/4 "2014-01-13T12:05:30Z")

</div>

Yes I am, and it worked. Thank you! 😄 Just had to update rake first.

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [December 4, 2025, 9:55am UTC](https://meta.discourse.org/t/do-uploaded-files-use-absolute-links/11920/5 "2025-12-04T09:55:46Z")

</div>


