Home › Knowledgebase › KB-1257

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.

Quick Tip: Need immediate assistance? đź’» Open a Ticket

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.

  1. Open your website in Google Chrome, Microsoft Edge, or Mozilla Firefox.
  2. Click the padlock icon in the address bar to view certificate details.
  3. Check that the certificate is valid for both the www and non-www versions of your domain.
  4. If the certificate does not cover all subdomains, contact your certificate provider to reissue or upgrade the certificate.

Locate Insecure Resources

  1. Open your website in Google Chrome, Microsoft Edge, or Mozilla Firefox.
  2. Press F12 or Ctrl + Shift + I (Windows) or Cmd + Option + I (Mac) to open Developer Tools.
  3. Click the Console tab. Look for warnings that say Mixed Content: followed by a URL being blocked because it was requested over HTTP.
  4. Click the Network tab and reload the page. Filter by img, js, or css to see which assets are loading over http:// instead of https://.

Update Insecure Links in Your Website Code

  1. Access your website files via FTP, SFTP, or your hosting control panel's file manager.
  2. Open the relevant HTML, PHP, or template files in a text editor.
  3. Find any hard-coded URLs beginning with http:// for images, scripts, stylesheets, or iframes.
  4. Change them to https://, or use protocol-relative URLs by removing the scheme entirely—for example, change http://example.com/image.jpg to //example.com/image.jpg.
  5. 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:

Update Links in a Content Management System

WordPress

  1. Log in to your WordPress admin dashboard.
  2. Go to Settings > General.
  3. Update both the WordPress Address (URL) and Site Address (URL) fields to use https://.
  4. Click Save Changes.
  5. Install a database search-and-replace plugin such as Better Search Replace.
  6. Search for your old domain with http:// and replace it with https:// across posts, pages, and widget content.
  7. Check Appearance > Customize for any hard-coded HTTP image or logo URLs.
  8. Clear any caching plugin you have installed, then reload your site.

WordPress Multisite and Domain Mapping

  1. Log in to the WordPress network admin dashboard.
  2. Go to My Sites > Network Admin > Settings.
  3. Ensure the Site Address (URL) uses https://.
  4. If you use domain mapping, verify each mapped domain is configured to force HTTPS in the domain mapping settings.
  5. Run a network-wide search-and-replace for http:// to https:// using a compatible database tool.

Joomla

  1. Log in to your Joomla administrator panel.
  2. Go to System > Global Configuration.
  3. Click the Site tab.
  4. Set Force HTTPS to Entire Site.
  5. Click Save & Close.
  6. Check template settings and module positions for hard-coded HTTP URLs in header, footer, and sidebar areas.

Drupal

  1. Log in to your Drupal admin dashboard.
  2. Go to Configuration > System > Site settings.
  3. Update the Base URL to use https://.
  4. Click Save configuration.
  5. 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.

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.

  1. Log in to your CDN provider's dashboard (for example, Cloudflare).
  2. Navigate to the SSL/TLS settings for your domain.
  3. Set the encryption mode to Full or Full (Strict), not Flexible.
  4. Enable Automatic HTTPS Rewrites if available to convert HTTP resource links to HTTPS at the edge.
  5. 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.