Ghost blog showing images in HTTP instead of HTTPS

Issue

This is a common issue related to Ghost CMS. Let’s assume your website is mywebsite.com, When you install ghost on your server, probably you have entered the site URL as http://mywebsite.com

Ghost automatically configures HTTPS for your website with Let’s Encrypt. But it takes the default website address as http://mywebsite.com, that’s the reason for images being served through HTTP instead of HTTPS

Solution

  • Login to your server
  • Go to ghost installation directory
Example:
cd /var/www/ghost
  • Run below command to Change ghost site URL. Change URL to your website URL
ghost config set url https://mywebsite.com
  • Restart Ghost
ghost restart

Now check your website. Issue should be fixed. If you are getting 502 errors after restarting ghost, wait for few minutes to complete ghost initialization process. If you still getting 502 errors, try starting ghost manually,

ghost start

Leave a Reply

(*) Required, Your email will not be published