Ahosting Logo
Knowledge Base

How to Fix Mixed Content Warnings After Installing SSL

After installing SSL, you might see a warning that your site is "partially secure" or the padlock shows a warning. This is caused by mixed content — loading HTTP resources on an HTTPS page.

What is Mixed Content?

Mixed content occurs when your HTTPS page loads resources (images, scripts, stylesheets) over HTTP. Browsers block or warn about this because it undermines the security of the encrypted connection.

Types of Mixed Content

  • Passive mixed content: Images, videos, audio — browsers may load with warning
  • Active mixed content: Scripts, stylesheets, iframes — browsers block these

How to Find Mixed Content

Method 1: Browser Developer Tools

  1. Visit your site with HTTPS
  2. Open Developer Tools (F12 or right-click ? Inspect)
  3. Go to the Console tab
  4. Look for "Mixed Content" warnings

Method 2: Online Scanner

Use tools like WhyNoPadlock.com or JitBit SSL Check to scan your pages.

How to Fix Mixed Content

1. Update URLs in Your CMS

For WordPress:

  1. Go to Settings ? General
  2. Change both URLs from http:// to https://
  3. Save changes

2. Search and Replace in Database

For WordPress, use a plugin like "Better Search Replace":

  1. Install and activate the plugin
  2. Search for: http://yourdomain.com
  3. Replace with: https://yourdomain.com
  4. Run on all tables

3. Fix Hardcoded URLs in Theme

Check your theme files for hardcoded http:// URLs and change them to https:// or use protocol-relative URLs:

<!-- Instead of this -->
<img src="http://example.com/image.jpg">

<!-- Use this -->
<img src="https://example.com/image.jpg">

<!-- Or protocol-relative -->
<img src="//example.com/image.jpg">

4. Update External Resources

If you load resources from external sites (fonts, scripts, CDNs), make sure they use HTTPS URLs.

5. Force HTTPS with .htaccess

Add this to your .htaccess file to redirect all HTTP to HTTPS:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

WordPress Plugins That Help

  • Really Simple SSL: Automatically fixes most mixed content issues
  • SSL Insecure Content Fixer: Fixes insecure content dynamically
  • Better Search Replace: Database search and replace

Tip: After fixing, clear your browser cache and CDN cache, then test again.