How to fix mixed content errors after installing an ssl certificate
Summary
This guide helps you troubleshoot and resolve: How to fix mixed content errors after installing an ssl certificate. Follow the steps below to fix the issue.
Common Causes
Identify Mixed Content Errors
Mixed content errors occur when a website loads securely over HTTPS, but certain elements—such as images, scripts, stylesheets, or fonts—are still being requested over an insecure HTTP connection. Modern web browsers block these insecure resources to protect visitors, which can result in broken page layouts, missing images, or security warnings in the address bar. This issue commonly appears shortly after an SSL certificate is installed and HTTPS is enabled.
Verify SSL Certificate Coverage
Before updating links, confirm your SSL certificate is correctly installed and covers all variations of your domain. A certificate that only covers yourdomain.com.au but not www.yourdomain.com.au can cause mixed content warnings on pages accessed via the non-covered subdomain.
- Open your website in Google Chrome, Microsoft Edge, or Mozilla Firefox.
- Click the padlock icon in the address bar to view certificate details.
- Check that the certificate is valid for both the www and non-www versions of your domain.
- If the certificate does not cover all subdomains, contact your certificate provider to reissue or upgrade the certificate.
Locate Insecure Resources
- Open your website in Google Chrome, Microsoft Edge, or Mozilla Firefox.
- Press
F12orCtrl + Shift + I(Windows) orCmd + Option + I(Mac) to open Developer Tools. - Click the Console tab. Look for warnings that say
Mixed Content:followed by a URL being blocked because it was requested over HTTP. - Click the Network tab and reload the page. Filter by
img,js, orcssto see which assets are loading overhttp://instead ofhttps://.
Update Insecure Links in Your Website Code
- Access your website files via FTP, SFTP, or your hosting control panel's file manager.
- Open the relevant HTML, PHP, or template files in a text editor.
- Find any hard-coded URLs beginning with
http://for images, scripts, stylesheets, or iframes. - Change them to
https://, or use protocol-relative URLs by removing the scheme entirely—for example, changehttp://example.com/image.jpgto//example.com/image.jpg. - Save the file and upload it back to the server if you edited it locally.
Update Hard-Coded URLs in Theme and Template Areas
Mixed content often persists in areas that are not updated by standard search-and-replace tools. Check the following locations for hard-coded HTTP URLs:
- Theme customizer settings (logo URLs, header images, favicon links).
- Widget areas and sidebar blocks containing external images or scripts.
- Header and footer template files with hard-coded asset paths.
- Configuration files such as
wp-config.phporconfig.phpthat reference HTTP resources. robots.txtand.htaccessfiles that may contain HTTP references.
Update Links in a Content Management System
WordPress
- Log in to your WordPress admin dashboard.
- Go to Settings > General.
- Update both the WordPress Address (URL) and Site Address (URL) fields to use
https://. - Click Save Changes.
- Install a database search-and-replace plugin such as Better Search Replace.
- Search for your old domain with
http://and replace it withhttps://across posts, pages, and widget content. - Check Appearance > Customize for any hard-coded HTTP image or logo URLs.
- Clear any caching plugin you have installed, then reload your site.
WordPress Multisite and Domain Mapping
- Log in to the WordPress network admin dashboard.
- Go to My Sites > Network Admin > Settings.
- Ensure the Site Address (URL) uses
https://. - If you use domain mapping, verify each mapped domain is configured to force HTTPS in the domain mapping settings.
- Run a network-wide search-and-replace for
http://tohttps://using a compatible database tool.
Joomla
- Log in to your Joomla administrator panel.
- Go to System > Global Configuration.
- Click the Site tab.
- Set Force HTTPS to Entire Site.
- Click Save & Close.
- Check template settings and module positions for hard-coded HTTP URLs in header, footer, and sidebar areas.
Drupal
- Log in to your Drupal admin dashboard.
- Go to Configuration > System > Site settings.
- Update the Base URL to use
https://. - Click Save configuration.
- Review theme settings and block configuration for any hard-coded HTTP resource links.
Force HTTPS Across Your Entire Site
Apache Servers (.htaccess)
Add the following code to your .htaccess file to redirect all HTTP traffic to HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Nginx Servers
Add the following server block to your Nginx configuration to redirect HTTP to HTTPS:
server {
listen 80;
server_name yourdomain.com.au www.yourdomain.com.au;
return 301 https://$server_name$request_uri;
}
Enable HTTP Strict Transport Security (HSTS)
Optionally, enable HSTS to tell browsers to always use HTTPS for your domain. For Apache, add this to your .htaccess file:
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Update Third-Party Embeds and External Resources
Some external services may only offer HTTP embed codes, which will trigger mixed content warnings even after your own site is secured.
- YouTube: Use the HTTPS embed code provided by YouTube, or change
http://tohttps://in the iframe URL. - Google Maps: Regenerate your embed code using the HTTPS version of the Google Maps platform.
- Social widgets: Check the provider's documentation for HTTPS-compatible embed scripts.
- External APIs: Update any API endpoints in your theme or plugin code from
http://tohttps://.
Configure Your CDN for HTTPS
If you use a content delivery network such as Cloudflare, mixed content can persist if the CDN is not configured to enforce HTTPS.
- Log in to your CDN provider's dashboard (for example, Cloudflare).
- Navigate to the SSL/TLS settings for your domain.
- Set the encryption mode to Full or Full (Strict), not Flexible.
- Enable Automatic HTTPS Rewrites if available to convert HTTP resource links to HTTPS at the edge.
- Purge your CDN cache after making changes.
Update Forms and Email Templates
Contact forms and email templates hosted on the same domain can also cause mixed content if they submit to or reference HTTP endpoints.
- Check your contact form settings and update the form action URL to
https://. - Review email templates and newsletter links for hard-coded HTTP URLs.
- Update any form plugins or modules to use secure submission endpoints.
- Clear your website cache, including any caching plugin or server-side cache.
- Clear your CDN cache if applicable.
- Clear your browser cache or test in an incognito window.
- Visit
http://yourdomain.com.auto confirm it automatically redirects tohttps://yourdomain.com.au. - Check the Console tab in Developer Tools to confirm no mixed content warnings remain.
- Update your sitemap to reflect HTTPS URLs and resubmit it to Google Search Console.
- Use the Change of Address tool in Google Search Console if you are moving from HTTP to HTTPS as a site migration.
- Monitor your search performance for any drops in traffic after the switch.
- Ensure all internal links, canonical tags, and hreflang attributes point to HTTPS versions of your pages.
Clear Caches and Verify
Troubleshooting Persistent Mixed Content
Errors persist after updating links
Some themes and plugins store absolute URLs in the database. A simple find-and-replace in files may not catch them. Use a database search-and-replace tool designed for your CMS, or check your theme's customiser settings for hard-coded image or logo URLs.
Padlock still shows as "Not Secure" or shows a warning triangle
This usually means one resource is still loading over HTTP. Check the Console tab in Developer Tools for the exact URL, then update it in your website code or CMS.
Content loads fine on desktop but breaks on mobile
Mobile caching or a mobile-specific theme may be serving cached HTTP URLs. Clear your mobile browser cache and any server-side or plugin-based cache, then retest.
Mixed content appears only on certain pages
Those pages may contain embedded content—such as videos, maps, or forms—hosted on an external service that does not support HTTPS. Replace the embed with an HTTPS-enabled version or host the content yourself.
Mixed content in theme or plugin files
If errors persist, inspect your active theme and plugin files for hard-coded HTTP URLs. Search for http:// within theme templates, plugin PHP files, and JavaScript assets. Update any insecure references to https:// or protocol-relative URLs.
SEO Considerations After Forcing HTTPS
Changing your site from HTTP to HTTPS can affect search engine rankings if not managed correctly.
If you are unable to resolve mixed content errors after following these steps, Open a Ticket and our support team will assist you.
Still Having Issues?
đź’» Open a Ticket