# Can't upload images when domain name is an IP address

**URL:** https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186
**Category:** Support
**Created:** [19 בינואר,‏ 2016,‏ 3:57pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186 "2016-01-19T15:57:42Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![FUNix\_IT\_Nguyen\_Ba\_N](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FUNix\_IT\_Nguyen\_Ba\_N](https://meta.discourse.org/u/FUNix_IT_Nguyen_Ba_N)
#### Post date: [19 בינואר,‏ 2016,‏ 3:57pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/1 "2016-01-19T15:57:42Z")

</div>

Hi every one, Im newbie.

I set up the Discourse under the IP [http://128.199.222.14/](http://128.199.222.14/).

But when i upload image, the image url change to the picture below and it can not display?

Can all you guys can help me to fix that.

![](https://global.discourse-cdn.com/meta/optimized/3X/a/4/a421910b2333516554b52dc5e072a99268790f03_2_690x25.png)

**I sovled that:** Change [http://128.199.222.14/](http://128.199.222.14/) to 128.199.222.14 in app.yml

---

<div class="post-metadata">

### Author: ![Nathaniel\_Mattocks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathaniel_mattocks/32/56580_2.png) [@Nathaniel\_Mattocks](https://meta.discourse.org/u/Nathaniel_Mattocks)
#### Post date: [19 בינואר,‏ 2016,‏ 4:03pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/2 "2016-01-19T16:03:11Z")

</div>

I will have a look on your site… I’m the user Nathanielmattock. 😉

---

<div class="post-metadata">

### Author: ![FUNix\_IT\_Nguyen\_Ba\_N](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FUNix\_IT\_Nguyen\_Ba\_N](https://meta.discourse.org/u/FUNix_IT_Nguyen_Ba_N)
#### Post date: [19 בינואר,‏ 2016,‏ 4:27pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/3 "2016-01-19T16:27:01Z")

</div>

Okay i will active you because i did not set up email sending yet.

---

<div class="post-metadata">

### Author: ![Nathaniel\_Mattocks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathaniel_mattocks/32/56580_2.png) [@Nathaniel\_Mattocks](https://meta.discourse.org/u/Nathaniel_Mattocks)
#### Post date: [19 בינואר,‏ 2016,‏ 4:45pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/4 "2016-01-19T16:45:00Z")

</div>

Hmm… What service do you use to host your data?

---

<div class="post-metadata">

### Author: ![FUNix\_IT\_Nguyen\_Ba\_N](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FUNix\_IT\_Nguyen\_Ba\_N](https://meta.discourse.org/u/FUNix_IT_Nguyen_Ba_N)
#### Post date: [19 בינואר,‏ 2016,‏ 4:50pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/5 "2016-01-19T16:50:02Z")

</div>

I use digital ocean.

The URL you upload is  
[http://128.199.222.14//uploads/default/original/1X/9a7032754d4a24aa23222a5961753a0bed74ffb5.jpg](http://128.199.222.14//uploads/default/original/1X/9a7032754d4a24aa23222a5961753a0bed74ffb5.jpg)

It’s work but in my site it’s converted to ‘//[http://128.199.222.14//uploads/default/original/1X/9a7032754d4a24aa23222a5961753a0bed74ffb5.jpg](http://128.199.222.14//uploads/default/original/1X/9a7032754d4a24aa23222a5961753a0bed74ffb5.jpg)’

I dont know why it added more two slashes before the origin URL.

---

<div class="post-metadata">

### Author: ![FUNix\_IT\_Nguyen\_Ba\_N](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FUNix\_IT\_Nguyen\_Ba\_N](https://meta.discourse.org/u/FUNix_IT_Nguyen_Ba_N)
#### Post date: [19 בינואר,‏ 2016,‏ 4:51pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/6 "2016-01-19T16:51:51Z")

</div>

I think i will rebuild again and set IP just is 128.199.222.14

---

<div class="post-metadata">

### Author: ![Nathaniel\_Mattocks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathaniel_mattocks/32/56580_2.png) [@Nathaniel\_Mattocks](https://meta.discourse.org/u/Nathaniel_Mattocks)
#### Post date: [19 בינואר,‏ 2016,‏ 6:44pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/7 "2016-01-19T18:44:35Z")

</div>

I might need the admin or at least moderator status to view some of the setup, unless someone that does support can…

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [19 בינואר,‏ 2016,‏ 8:18pm UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/8 "2016-01-19T20:18:17Z")

</div>

I think it could be an error in the file app.yml

Line ~57 you should have

```
DISCOURSE_HOSTNAME: '128.199.222.14'

```

Nothing more

---

<div class="post-metadata">

### Author: ![FUNix\_IT\_Nguyen\_Ba\_N](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FUNix\_IT\_Nguyen\_Ba\_N](https://meta.discourse.org/u/FUNix_IT_Nguyen_Ba_N)
#### Post date: [20 בינואר,‏ 2016,‏ 12:41am UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/9 "2016-01-20T00:41:32Z")

</div>

Okay it’s exactly. I finish fixed it.😃

---

<div class="post-metadata">

### Author: ![FUNix\_IT\_Nguyen\_Ba\_N](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FUNix\_IT\_Nguyen\_Ba\_N](https://meta.discourse.org/u/FUNix_IT_Nguyen_Ba_N)
#### Post date: [20 בינואר,‏ 2016,‏ 12:42am UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/10 "2016-01-20T00:42:04Z")

</div>

I finished that. Thanks for your help.😃

---

<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: [20 בינואר,‏ 2016,‏ 9:10am UTC](https://meta.discourse.org/t/cant-upload-images-when-domain-name-is-an-ip-address/38186/11 "2016-01-20T09:10:52Z")

</div>


