Ghost defaulting to loading images via HTTP, rather than HTTPS

If you’re looking for help, please provide information about your environment. If you delete this template and don’t provide any information, your topic will be closed.

If you aren’t running the latest version of Ghost, the first thing we will ask you to do is update to the latest version of Ghost.

  • What’s your URL? This is the easiest way for others to help you
  • What version of Ghost are you using? If it’s not the latest, please update Ghost first before opening your topic
    • I am running the latest version of Ghost

And

  • How was Ghost installed and configured?
  • What Node version, database, OS & browser are you using?
    • Node Version: 12.19.1
  • What errors or information do you see in the console?
    • When loading some of my blog posts, I’m able to see an error in the Chrome developer panel containing the following error:

Mixed Content: The page at ‘(redacted due to limitations on how many links i can add)’ was loaded over HTTPS, but requested an insecure image ‘redacted due to limitations on how many links i can add’. This request has been blocked; the content must be served over HTTPS.

  • What steps could someone else take to reproduce the issue you’re having?
    • If you visit my site in Chrome and say, take a look at the blog post of mine, you’ll see that the images in the article don’t actually load due to Chrome’s restriction on HTTPS pages loading content over HTTP.

Does anyone have any troubleshooting tips or ideas on why my images are defaulting to HTTP, rather than HTTPS? I’m not sure why it’s started to do this. If you look at some of my older posts, you can see that the images are loading as they should. I’m not sure what could have changed. I’ve ensured my blog url has been configured to use https://tcude.net.

It’s also worth mentioning that I can confirm that I can directly access the URL for these images via HTTPS

In my nginx configuration, I have two files: tcude.net.conf and tcude.net-ssl.conf. I currently have tcude.net.conf set up in the following manner with the goal of redirecting HTTP traffic to HTTPS:

server {
    listen 80;
    listen [::]:80;

    server_name tcude.net;
    return 301 https://$host$request_uri;
}

Any suggestions? I’d really like to get my images back to working again

Hey there! Can you check that your site URL is configured to be https://tcude.net? You can do this by running ghost config get url. This URL is kind of the source of truth for everything, so it has to be configured with https

2 Likes

I appreciate the suggestion but what was one of the first things I attempted to troubleshoot with. It does not look to be alleviating my issue

Did you restart Ghost after updating the url? The admin panel is reporting the url to be http:

https://tcude.net/ghost/api/v3/admin/site/

3 Likes

Wow, what a pro! I thought I had restarted the server after trying that step but I guess I didn’t. Thank you for the help :smiley:

Things seem to be working as they should now!

1 Like

I tried ghost config get url, it seved as https, but the api https://imseek.cn/ghost/api/v3/admin/site/ still returned http yet, why?

I replied on your other thread:

2 Likes

Thanks, I solved. I’ll add a new post insted of ask in an old post next time.