When a visitor requests a secure page (https://) on your site, browsers expect all elements (images, scripts, CSS, etc.) to load securely. If some resources load via http://, the page mixes secure and insecure content. This causes browser warnings and may compromise security.

 

Symptoms

  • Broken padlock icon in the browser’s address bar.

  • Warning messages such as:

    • Firefox: “The connection to this website is not fully secure because it contains unencrypted elements.”

    • Chrome: “This page includes other resources which are not secure. These resources can be viewed by others while in transit.”

    • Internet Explorer: “This webpage contains content that will not be delivered using a secure HTTPS connection.”

 

Cause

  • The page contains hyperlinks or embedded resources using http:// instead of https://.

  • Examples:

    <img src="http://www.example.com/images/picture.jpg">
    <script src="http://www.example.com/js/script.js"></script>
    <link rel="stylesheet" href="http://www.example.com/css/style.css">
    

     

 

Resolution Methods

Method 1: Use Content‑Security‑Policy (CSP) Header

Add the following to your server configuration or .htaccess file:

Apache

<IfModule mod_headers.c>
  Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>

This instructs browsers to automatically upgrade insecure requests to HTTPS.

 

Method 2: Use Meta Tag in Page Source

Add this line inside the <head> section of your HTML:

 
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

Method 3: Update Resource Links

  • Replace all http:// references with https://.

  • Ensure images, scripts, and stylesheets are served securely.

 

Notes

  • Always verify that external resources support HTTPS before upgrading links.

  • Mixed content weakens encryption and may allow attackers to modify insecure elements.

  • Use browser developer tools (F12) to identify insecure resources.

Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution