# Feature\_image url is http instead of https

**URL:** <https://forum.ghost.org/t/feature-image-url-is-http-instead-of-https/13591>\
**Category:** Developer help\
**Created:** [April 17, 2020, 3:01am UTC](https://forum.ghost.org/t/feature-image-url-is-http-instead-of-https/13591 "2020-04-17T03:01:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tettoffensive](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/tettoffensive/32/7306_2.png) [@tettoffensive](https://forum.ghost.org/u/tettoffensive)\
**Post date:** [April 17, 2020, 3:01am UTC](https://forum.ghost.org/t/feature-image-url-is-http-instead-of-https/13591/1 "2020-04-17T03:01:42Z")

</div>

I am running ghost on an EC2 instance with ubuntu and nginx. I have SSL set up as well as http forwarding to https. However, for my website which makes calls to the content API, I need the images urls to have ‘https:’ Other than manually replacing the strings in my code is there a way to do this?

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [April 17, 2020, 3:03am UTC](https://forum.ghost.org/t/feature-image-url-is-http-instead-of-https/13591/2 "2020-04-17T03:03:30Z")

</div>

Those urls come from the domain you configured in ghost. You can update this url by running

`ghost config set url {url}`  
and then restarting ghost  
`ghost restart`

---

<div class="post-metadata">

**Author:** ![denvergeeks](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/denvergeeks/32/7401_2.png) [@denvergeeks](https://forum.ghost.org/u/denvergeeks)\
**Post date:** [April 17, 2020, 3:05am UTC](https://forum.ghost.org/t/feature-image-url-is-http-instead-of-https/13591/3 "2020-04-17T03:05:21Z")

</div>

@tettoffensive I just posted about this the other day, and there are lots of posts about it.

> [@Ghost serves images over HTTP randomly causing chrome warnings](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/7):
>
> Here is how I fix this. (I simply edit my Ghost site files in [the browser-based File Manager of my cPanel-hosted Ghost sites](https://ghost-o-matic.com/my-ghost-dev-tools/).) (Also note that after making the below change, you may need to Restart your Ghost and/or possibly also re-upload the offending images in your posts to reset the URLs in the database.) Anyhoo, this first block of code below shows the entire contents of the config.development.json file in the root directory of my Ghost site. Here you can see that that the “url”: was (by…

[https://forum.ghost.org/search?expanded=true&q=http%20images%20order%3Alatest](https://forum.ghost.org/search?expanded=true&q=http%20images%20order%3Alatest)

---

<div class="post-metadata">

**Author:** ![Jeyrce](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jeyrce/32/29965_2.png) [@Jeyrce](https://forum.ghost.org/u/Jeyrce)\
**Post date:** [April 18, 2024, 9:03am UTC](https://forum.ghost.org/t/feature-image-url-is-http-instead-of-https/13591/4 "2024-04-18T09:03:13Z")

</div>

Excuse me, I got a similar problem, help please.

- my site: [天涯何处觅知音](https://imseek.cn/about/)
- ghost version: 5.75.2
- deploy in docker with `ghost:5.75.2-alpine`

this is my configuration file (config.production.json):

```auto
{
  "url": "https://imseek.cn",
  "server": {
    "port": 2369,
    "host": "127.0.0.1"
  },
  "mail": {
    "transport": "SMTP",
    "options": {
      "service": "smtp.exmail.qq.com",
      "auth": {
        "user": "i@imseek.cn",
        "pass": " *****"
      }
    }
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/lib/ghost/content"
  }
}

```

The problem, when open the target url [https://imseek.cn/about/](https://imseek.cn/about/), the picture I upload in page rejected because it’s url has http protocol, but the domain `imseek.cn` was https.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/2/e/2e654be07d8fd1d29f09b3c5d67095fab6076209.png)

My nginx configuration file:

```auto
#[root@imseek ghost]# cat /etc/nginx/conf.d/imseek.cn.conf
server {
        listen 80;
        server_name imseek.cn www.imseek.cn *.imseek.cn;
	return 301 https://imseek.cn$request_uri;
}

server {
    	listen 443 ssl;
        server_name imseek.cn www.imseek.cn;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_certificate "/etc/nginx/ssl/www.imseek.cn.pem";
        ssl_certificate_key "/etc/nginx/ssl/www.imseek.cn.key";
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout 10m;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;
        location / {
            #root /etc/nginx/html/imseek.cn/;
            #index index.html;
	    proxy_pass http://ghost:2368;
	}
}

```

Did I write the configuration here wrong?

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [April 18, 2024, 1:54pm UTC](https://forum.ghost.org/t/feature-image-url-is-http-instead-of-https/13591/5 "2024-04-18T13:54:08Z")

</div>

Please don’t bump multiple very old threads to ask the same question. Next time, please make a new thread.

Just to confirm before trying to troubleshoot: Did you restart ghost and reload nginx after making any changes?

---

<div class="post-metadata">

**Author:** ![Jeyrce](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jeyrce/32/29965_2.png) [@Jeyrce](https://forum.ghost.org/u/Jeyrce)\
**Post date:** [April 18, 2024, 2:29pm UTC](https://forum.ghost.org/t/feature-image-url-is-http-instead-of-https/13591/6 "2024-04-18T14:29:30Z")

</div>

Thanks, I found the reason, just because or `env` settings in my docker-compose.yaml, the `url` was overwritten.
