You have made the switch to HTTPS — congratulations. Your SSL certificate is installed, your site loads with a padlock icon, and Google rewards HTTPS sites with a ranking boost. But then you notice something: on certain pages, the padlock disappears, replaced by a warning icon or "Not Secure" label. The culprit is mixed content — insecure HTTP resources loading on your otherwise secure HTTPS page. In this guide, we cover how to find and fix every type of mixed content warning on cPanel hosting.

What Is Mixed Content and Why It Hurts SEO

Mixed content occurs when an HTTPS page loads sub-resources (images, scripts, stylesheets, fonts, iframes) over plain HTTP. Browsers classify mixed content into two categories:

The SEO impact is threefold:

  1. Lost HTTPS ranking boost: Google grants a small ranking advantage to fully secure HTTPS pages. Mixed content undermines this because the page is not truly secure.
  2. Broken page functionality: Blocked active content (scripts, CSS) can cause layout issues, missing functionality, and increased CLS — directly hurting Core Web Vitals scores.
  3. User trust erosion: A missing padlock increases bounce rates, especially on e-commerce sites where users look for security indicators before entering payment information.

Common Causes of Mixed Content

Mixed content typically originates from these sources:

SourceExamplesFrequency
Hardcoded HTTP URLs in contentImages in blog posts, pagesVery common
Theme/template filesCSS background images, font URLsCommon
Plugin/extension assetsJavaScript files, CSS from pluginsCommon
Third-party embedsYouTube (old embed code), maps, widgetsModerate
Inline CSSstyle="background: url(http://...)"Moderate
Database-stored URLsWordPress options, widget contentCommon in CMS
External resourcesCDN URLs, analytics scripts, ad networksModerate
Canonical/hreflang tagsHTTP URLs in meta tagsOften overlooked

Step 1: Find All Mixed Content

Browser Console Method

  1. Open your site in Chrome, press F12, and go to the Console tab.
  2. Navigate through your pages. Any mixed content generates a console warning:
    Mixed Content: The page at 'https://yourdomain.com/page' was loaded over HTTPS,
    but requested an insecure resource 'http://yourdomain.com/image.jpg'.
    This request has been blocked; the content must be served over HTTPS.
  3. Each warning identifies the exact insecure URL and the HTML element that references it.

Site-Wide Scan Method

Manually checking every page is impractical for large sites. Use these tools instead:

Step 2: Fix Mixed Content in cPanel

Fix 1: Force HTTPS via .htaccess (Catch-All)

The most effective first step is to add a blanket HTTP-to-HTTPS redirect in your .htaccess file. Open File Manager in cPanel, navigate to public_html, and edit .htaccess:

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

This ensures any HTTP request to your site automatically redirects to HTTPS. It fixes mixed content for resources hosted on your own domain — images, CSS, and JS files requested over HTTP will redirect to their HTTPS versions. For more details on configuring redirects, see our comprehensive cPanel redirect guide.

Fix 2: Add Content-Security-Policy Header

For an additional layer of protection, add a CSP header that upgrades insecure requests:

# Automatically upgrade HTTP requests to HTTPS
<IfModule mod_headers.c>
  Header always set Content-Security-Policy "upgrade-insecure-requests"
</IfModule>

The upgrade-insecure-requests directive tells browsers to silently change HTTP URLs to HTTPS before making the request. This catches hardcoded HTTP URLs in your HTML without needing to edit every page. It works for both your own resources and third-party resources (as long as they support HTTPS).

Fix 3: Update Hardcoded URLs in WordPress

If you run WordPress on cPanel, the most thorough fix is a search-and-replace across the database:

  1. Backup your database first through cPanel's phpMyAdmin or the Backup Wizard.
  2. Install the Better Search Replace plugin (or use WP-CLI if you have SSH access).
  3. Search for http://yourdomain.com and replace with https://yourdomain.com.
  4. Run a dry run first to see how many replacements will be made.
  5. Execute the replacement.
  6. Also update Settings > General: change both "WordPress Address (URL)" and "Site Address (URL)" to use https://.

Fix 4: Update Theme and Plugin Files

Some mixed content comes from hardcoded HTTP URLs in theme templates or plugin files. Access these through cPanel File Manager:

  1. Navigate to public_html/wp-content/themes/your-theme/.
  2. Search through template files (header.php, footer.php, functions.php) for http:// URLs.
  3. Replace them with https:// or use protocol-relative URLs (//yourdomain.com/file.jpg) — though HTTPS is preferred over protocol-relative in 2026.

For non-WordPress sites, check your CSS files for background-image: url(http://...) and JavaScript files for hardcoded HTTP API endpoints or resource URLs.

Fix 5: Update Third-Party Embeds

Common third-party sources of mixed content:

Step 3: Verify the Fix

After making changes, verify mixed content is fully resolved:

  1. Clear browser cache and visit your site. Look for the padlock icon in the address bar.
  2. Check the browser console (F12 > Console) for any remaining mixed content warnings.
  3. Re-scan with Screaming Frog or JitBit to confirm site-wide compliance.
  4. Test on multiple browsers — Chrome, Firefox, and Safari handle mixed content slightly differently.
  5. Check Google PageSpeed Insights for any remaining security warnings.

Preventing Mixed Content in the Future

Once fixed, prevent mixed content from recurring:

HTTPS Migration Checklist for SEO

Mixed content is just one part of a successful HTTPS migration. Here is the complete checklist:

  1. Install SSL certificate (free via Auto SSL on MassiveGRID's high-availability cPanel hosting, or install a custom certificate through cPanel's SSL/TLS Manager).
  2. Add HTTP-to-HTTPS 301 redirects in .htaccess.
  3. Fix all mixed content (this guide).
  4. Update canonical tags to use HTTPS.
  5. Update your XML sitemap to list HTTPS URLs.
  6. Update robots.txt sitemap reference to HTTPS.
  7. Update Google Search Console property (add HTTPS version).
  8. Update Google Analytics settings to use HTTPS.
  9. Update all internal links to HTTPS (database search-replace for CMS sites).
  10. Verify external services (CDN, analytics, ads) use HTTPS.
  11. Update social media profiles and external listings with HTTPS URLs.
  12. Monitor Search Console for crawl errors during the transition.

Troubleshooting Stubborn Mixed Content

Mixed Content From External Scripts You Cannot Control

If a third-party service only offers HTTP, you have limited options: replace the service with an HTTPS alternative, proxy the resource through your own server, or remove it entirely. In 2026, any reputable service supports HTTPS. If a provider does not, it is a red flag about their security practices.

Mixed Content Only Appearing on Certain Pages

This usually indicates page-specific content (images in blog posts, custom HTML blocks) containing hardcoded HTTP URLs. For WordPress, the database search-replace method catches these. For static sites, search your HTML files using cPanel File Manager's search function or via command line.

Padlock Missing Despite No Console Warnings

Some resources (like favicons loaded in browser tabs) may not trigger console warnings but still affect the padlock. Check all resources in the Network tab, filtering by protocol. Also verify that your site itself is not loading in an iframe on a non-HTTPS page.

Frequently Asked Questions

Does mixed content directly lower my Google rankings?

Google has not stated that mixed content is a direct ranking signal. However, it undermines the HTTPS ranking boost, can break page functionality (hurting Core Web Vitals), and increases bounce rates due to security warnings. The cumulative effect on rankings can be significant, especially in competitive niches.

Is the upgrade-insecure-requests header safe to use?

Yes, it is widely supported (97%+ of browsers) and recommended by Google. It silently upgrades HTTP requests to HTTPS without breaking anything — as long as the resources are available over HTTPS. If a resource does not exist at its HTTPS URL, the request will fail. Test key pages after enabling this header.

Can mixed content appear after a WordPress plugin update?

Yes. Plugin updates can reintroduce hardcoded HTTP URLs, especially in plugins that store configuration in the database. After updating plugins, spot-check a few pages using browser DevTools to catch any new mixed content warnings.

Should I use protocol-relative URLs (//example.com) to fix mixed content?

Protocol-relative URLs were a common fix in the past, but they are no longer recommended. Since virtually all websites should be on HTTPS in 2026, use explicit https:// URLs. Protocol-relative URLs can cause issues with some CDNs and services, and they add unnecessary ambiguity.

How long after fixing mixed content will my SEO improve?

The HTTPS ranking signal is applied at the page level, so the benefit appears as Google recrawls each fixed page. For most sites, this takes 1-4 weeks depending on crawl frequency. You can accelerate the process by requesting re-indexing through Google Search Console's URL Inspection tool for your most important pages.