Ghost blog returning images via http instead of https

I setup a ghost blog on google cloud, with SSL being handled on Google’s own load balancer. The pages load fine without any issues, however, whenever I upload images to my posts, the images are loaded over http and not https.

I tried telling nginx to force https, but that resulted in too many redirects.

The images seem to be loading over HTTPS for me. Did you manage to figure out what the problem was? Maybe it’s just your browser cache?

Your site url is configured to be http://webfives.com. If you’re using SSL, your site url must be configured with it (run ghost config set url https://webfives.com)

3 Likes

The website is hosted on Google Cloud Platform (GCP) and this was my previous (non-working setup):
website => Load Balancer w/SSL (managed SSL by GCP) => instance/s
Nameserver hosted on CloudFlare with SSL turned off.
Site url configured as: http://webfives.com
Site url (SSL) configured as: https://webfives.com

The above setup resulted in images in my posts loaded as http.

Fix:
website => Load Balancer (no SSL cert on the loadbalancer) => instance/s
Nameserver hosted on CloudFlare with SSL turned ON.
Site url configured as: http://webfives.com
Site url (SSL) configured as: https://webfives.com

The above setup works. I imagine the issue is related to routing between LB with SSL vs LB without SSL and Cloudflare managing the cert.

Thanks, don’t mean to grave dig but this did help a lot with my recent issues!

i solved my problem as well by changing cloudflare to force SSL on my domain. that did the trick. thanks!

Thank you kind internet stranger, this was my problem exactly!

2 Likes

Thank you for the fix. After setting the URL as you mentioned here, the issue was not fixed. However, the site URL was changed to HTTPS, not image URL’s. According to this guide https://errorsfixing.com/ghost-blog-showing-images-in-http-instead-of-https/ you will need to restart ghost after changing the site URL. Also, I got 502 errors after restarting Ghost. Then I manually started the ghost server as mentioned in the guide and now it is working 100% perfectly!

Thnx… @Ted_James worked like charm :smile: