I have some images in my website that used to Ioad before the SSL with:
http:// MY.IP.NUMBER/path/img.png
Those images are not loading, even if change the http to https. I have Automatic HTTPS Rewrites and Always Use HTTPS turned on in my configurations at SSL/TLS options on Cloudflare.
Does anyone has seen this problem before? My website is celestialchart. com
SSL certificates are issued to hostnames*. You need to use a hostname, not an IP address for your images to load over HTTPS. Update your image URLs to use hostnames in a domain with a valid SSL certificate and you will be on the way to your desired outcome.
*It is technically possible to purchase an SSL certificate for an IP address, but it falls far beyond the scope of this situation.
Thanks a lot, @epic.network. I’ll make this change and let a feedback here. Just to pitcure why I have used IP on the references, I have two websites that access the same images, and some codes to generate. So, the IP came as a solution to both sites load same images and same codes. I’ll fix that, Thak you very much!
If your objective is to keep the shared resource secret (FSVO secret) from visitors to the two sites while using shared resources, serving those resources from a generic sounding third domain name that has no “real” site running on the apex domain might yield similar results for likely negligible expense.
e.g. https://image-code.${some-real-tld-here}/path/img.png
I even tried https. I assure that the path is ok, even so, on the page the image still doesn’t show up, and if you put the url on the browser you will see my 404 page. This image is a small icon if you manage or see it.
I’m pretty sure SSL doesn’t have images. Any idea?
You need to use SSL or you are going to have with mixed content warnings in your visitors’ browsers.
Before you start looking into the cause of your 404 errors, you might want to figure out why your site is not loading over SSL. When you pause Cloudflare does your site load over SSL? If not, you need to fix that first. Then you can start looking at the 404 entries in your logs to see why they are occurring.
Sorry, I meant “I’m pretty sure SSL doesn’t block images”.
The site is now loading with SSL. If you can, check celestialchart.com.
Remember I have two sites there? only celestialchart.com is configured for SSL now, and the images in it, referenced by http: or https:// celestialchar.com/path/image.png won’t load.
The HTTP 302 response in the log entry you shared tells you where to look next. Check your rewrites and redirects (on your origin server). Temporarily increase the verbosity in your mod_rewrite config if you aren’t seeing enough detail. Be sure to decrease it when you finish troubleshooting.