skip to Main Content

I set up lightsail with wordpress, and everything was working great up until I enabled the CDN. It seems that wordpress is now remapping some of its static content file names (but not all) to ‘http://’ rather than ‘https://’ causing a mixed content error.

When I access the lightsail instance directly using its static ip I dont have this problem, it works fine and all urls are ‘https://’.

What gives? Why would wordpress be generating http instead of https urls, but only when I try to access it through the CDN? (and even more bizarrely its only some of the urls, most work just fine)

2

Answers


  1. Check those URL rource if they are external or not make sure you have all data inside your hosting service and its getting fetched internally using Https peotocol. Further if you are fetching any external resource, then check if those using HTTP protocol

    Login or Signup to reply.
  2. When you create your CDN there is an option in the Details tab called "your distribution pulls content from your origin using HTTP only" this option is by default selected. so if your instance has SSL installed then you have to select the other option called "your distribution pulls content from your origin using HTTPS only" then you should be fine.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search