# Discourse is loading pictures from the wrong domain

**URL:** <https://meta.discourse.org/t/discourse-is-loading-pictures-from-the-wrong-domain/36727>\
**Category:** Self-hosting\
**Created:** [2015年十二月15日 05:13 UTC](https://meta.discourse.org/t/discourse-is-loading-pictures-from-the-wrong-domain/36727 "2015-12-15T05:13:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![akselm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akselm/32/122107_2.png) [@akselm](https://meta.discourse.org/u/akselm)\
**Post date:** [2015年十二月15日 05:13 UTC](https://meta.discourse.org/t/discourse-is-loading-pictures-from-the-wrong-domain/36727/1 "2015-12-15T05:13:50Z")

</div>

Hello! I’m having some issues on my forum.

here is an example:

[http://www.thestratagemmc.com/t/archers-arena-pvp-tournament/261](http://www.thestratagemmc.com/t/archers-arena-pvp-tournament/261)

if I go into chrome dev tools, the src attribute of the image at the top of the thread is:

`//thestratagemmc.com/uploads/default/original/1X/e2dcc4788b0b1472e5d3d46427d0cd6498de60c8.png`

however, [thestratagemmc.com](http://thestratagemmc.com) is a redirect to [www.thestratagemmc.com](http://www.thestratagemmc.com). If i change the src attribute to be  
`/uploads/default/original/1X/e2dcc4788b0b1472e5d3d46427d0cd6498de60c8.png` or `//www.thestratagemmc.com/uploads/default/original/1X/e2dcc4788b0b1472e5d3d46427d0cd6498de60c8.png`, the image displays.

Any idea how to fix this? I have no idea why `thestratagemmc.com` is redirecting to `www.thestratagemmc.com`, I’ve checked my apache virtual hosts, haproxy config, and my domain records–nothing indicates a redirect. If I change my haproxy config to redirect `www.thestratagemmc.com` to `thestratagemmc.com`, i get a redirect loop.

I thought it might be easier to just change where the image loads from rather than solve the domain issue, but I have no idea how.

---

<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:** [2015年十二月15日 06:25 UTC](https://meta.discourse.org/t/discourse-is-loading-pictures-from-the-wrong-domain/36727/2 "2015-12-15T06:25:55Z")

</div>

Sounds like you have the wrong URL specified for your site in app.yml?

---

<div class="post-metadata">

**Author:** ![akselm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akselm/32/122107_2.png) [@akselm](https://meta.discourse.org/u/akselm)\
**Post date:** [2015年十二月15日 06:45 UTC](https://meta.discourse.org/t/discourse-is-loading-pictures-from-the-wrong-domain/36727/3 "2015-12-15T06:45:07Z")

</div>

Yep, I’m dumb. Thanks a lot!

---

<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:** [2015年十二月15日 07:02 UTC](https://meta.discourse.org/t/discourse-is-loading-pictures-from-the-wrong-domain/36727/4 "2015-12-15T07:02:33Z")

</div>

Ok cool, is that the fix? I was just looking at the simplest explanation for the behavior you described.

---

<div class="post-metadata">

**Author:** ![akselm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akselm/32/122107_2.png) [@akselm](https://meta.discourse.org/u/akselm)\
**Post date:** [2015年十二月16日 02:23 UTC](https://meta.discourse.org/t/discourse-is-loading-pictures-from-the-wrong-domain/36727/5 "2015-12-16T02:23:28Z")

</div>

Yep, it works. I had to edit existing pages with images to change the url they pointed to, but new uploads are working just fine. Thanks again.

---

<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:** [2015年十二月16日 02:36 UTC](https://meta.discourse.org/t/discourse-is-loading-pictures-from-the-wrong-domain/36727/6 "2015-12-16T02:36:20Z")

</div>


