How to Fix SSL Mixed Content Warnings (Insecure Content Detected)

52 views
Short answer: Update hardcoded internal HTTP URLs to HTTPS within database and template assets, or install Really Simple SSL plugin in WordPress to automatically rewrite insecure links.

Eliminate browser 'Not Secure' warnings and padlock broken alerts caused by HTTP resources (images, fonts, scripts) loading over HTTPS connections.

Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup

Quick reference

Symptom Padlock shows exclamation triangle: 'Your connection to this site is not fully secure'
Browser DevTools Shortcut F12 > Console tab (shows exact URLs blocked)
Automatic .htaccess Header Header always set Content-Security-Policy 'upgrade-insecure-requests;'

Steps

  1. Identify Mixed Content Elements: Open your website in Google Chrome, press F12 to open DevTools, and click on the Console tab. Look for yellow/red warning lines:
    Mixed Content: The page at 'https://example.com' was loaded over HTTPS, but requested an insecure image 'http://example.com/logo.png'. This content should also be served over HTTPS.
  2. Fix via .htaccess (Server-Side Force Upgrade):
    • Open .htaccess in cPanel File Manager.
    • Add the following directive at the very top:
      <IfModule mod_headers.c> Header always set Content-Security-Policy "upgrade-insecure-requests;" </IfModule>
    • This instructs modern browsers to automatically fetch all http:// asset links via https://.
  3. Fix in WordPress via Database Search-and-Replace:
    • Hardcoded HTTP URLs inside post content or theme settings must be rewritten.
    • Use a plugin like Better Search Replace or WP-CLI in Terminal:
      wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --all-tables

Troubleshooting and tips

  • External Third-Party Images: If an external widget (e.g. weather badge or banner) only supports HTTP, browsers will block it. Host the image locally on your server or switch to a provider that supports HTTPS.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket