Mixed content occurs when a webpage is loaded over a secure HTTPS connection, but some of its resources (images, scripts, stylesheets, fonts, iframes, etc.) are still being loaded over insecure HTTP. Modern browsers block or warn about these requests, which can cause broken images, missing styles, non-functioning scripts, and browser "Not Secure" warnings.
A typical browser console error looks like this:
Mixed Content: The page at 'https://example.com/' was loaded over HTTPS,
but requested an insecure resource 'http://example.com/wp-content/uploads/image.jpg'.
This request has been blocked; the content must be served over HTTPS.
http:// URLs in your site's content, theme files, or plugin settings.http:// before the site was migrated to HTTPS.The Really Simple SSL plugin is the fastest way to resolve mixed content on a WordPress site. It automatically detects your SSL certificate, updates your site URL, and fixes most mixed content issues dynamically.
https://.http:// references with https:// in your page output.http:// URLs still exist in your database. If you later deactivate the plugin without first doing a database search-and-replace, mixed content will return.http://yourdomain.com and replace them with https://yourdomain.com.If you are on an Apache-based hosting environment (most cPanel and DirectAdmin servers), you can force all HTTP traffic to HTTPS using an .htaccess rule. This ensures that any resource requested over HTTP is automatically redirected to HTTPS.
.htaccess file in your site's document root (usually public_html/).RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteEngine On — Enables Apache's URL rewriting engine.RewriteCond %{HTTPS} !=on — Checks whether the current request is NOT using HTTPS.RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] — Redirects the request to the same URL but over HTTPS, using a 301 (permanent) redirect.http:// URLs within your HTML or database. If your page source contains http://yourdomain.com/image.jpg, the browser will first try to load it over HTTP, get redirected to HTTPS, and then load it. This creates an unnecessary extra request. In some cases, browsers may still flag a mixed content warning before following the redirect..htaccess rule with either the Really Simple SSL plugin or a search-and-replace on the database for best results..htaccess rules apply — LiteSpeed is compatible with Apache rewrite rules.After applying either solution:
If mixed content persists after trying the above solutions, the insecure URLs are likely hard coded in your site's database or theme files. Contact our support team and we can help you investigate further.