Home › Knowledgebase › KB-1246

How to fix mixed content warnings after installing ssl

Summary

This guide helps you troubleshoot and resolve: How to fix mixed content warnings after installing ssl. Follow the steps below to fix the issue.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

Common Causes

When an SSL certificate is installed on your domain but some images, scripts, or stylesheets continue to load via HTTP instead of HTTPS, browsers may display a "Not Secure" warning or block those assets entirely. This is known as mixed content. It occurs when a website is accessed over a secure connection, but certain elements on the page are still being requested over an insecure connection. This article explains how to identify mixed content and update your site so that every asset is served securely.

Quick Fix Steps

  1. Visit your website using https:// in your browser.
  2. Open the browser developer tools to identify which resources are loading over HTTP.
  3. Update your site URLs and resource links from http:// to https://.
  4. Clear your website cache and reload the page to verify the warning is gone.

Detailed Instructions

Identify Mixed Content in Your Browser

  1. Open your website in Google Chrome, Microsoft Edge, or Mozilla Firefox using https://yourdomain.com.au.
  2. Right-click anywhere on the page and select Inspect, or press F12 to open developer tools.
  3. Click the Console tab. Look for warnings that say "Mixed Content" or "Blocked mixed content." These messages list the exact URLs being loaded insecurely.
  4. Alternatively, click the Network tab, refresh the page, and look for any requests starting with http:// instead of https://.

Update Your Site Address and Resource Links

  1. Log in to your website's admin dashboard or content management system.
  2. Navigate to the general settings or site URL configuration.
  3. Change the site address and home URL from http:// to https://, then save your changes.
  4. If you use WordPress, go to Settings > General. Update both the WordPress Address (URL) and Site Address (URL) fields to start with https://, then click Save Changes.
  5. If you use cPanel, log in to your hosting account and look for the Domains or SSL/TLS section to ensure your primary domain is configured for HTTPS.
  6. If you use Plesk, navigate to Websites & Domains, select your domain, and check the SSL/TLS Certificates settings to enable HTTPS.
  7. For hard-coded links in your theme or template files, update any http:// references to https://, or use protocol-relative URLs such as //yourdomain.com.au/image.jpg.

Update Internal Links and Hardcoded URLs in Content

  1. After changing your site URL in the admin settings, update any remaining internal links within your page and post content that still point to http://.
  2. For WordPress, install a reputable search and replace plugin such as Better Search Replace or Velvet Blues Update URLs.
  3. Run a search for your old domain using http://yourdomain.com.au and replace it with https://yourdomain.com.au.
  4. Pay close attention to the database tables that store post content, widget settings, and theme options.
  5. After the replacement is complete, deactivate and remove the plugin to keep your site lean.
Always create a full backup of your website files and database before running a search and replace operation or editing theme files. Incorrect replacements can break your site layout or prevent it from loading.

Update Hardcoded URLs in Theme Files via FTP or File Manager

  1. Access your website files via FTP or your hosting control panel's file manager.
  2. Navigate to your active theme directory, typically found in /wp-content/themes/your-theme-name/ for WordPress.
  3. Open template files such as header.php, footer.php, and functions.php in a text editor.
  4. Search for any instances of http:// and replace them with https:// or protocol-relative URLs.
  5. Save the files and upload them back to the server if you are using FTP.

Force HTTPS with a Redirect

  1. Access your website files via FTP or your hosting control panel's file manager.
  2. Locate the .htaccess file in your root directory for Apache servers. If your server uses Nginx, contact support for the correct redirect rule.
  3. Add a redirect rule that sends all HTTP traffic to HTTPS, ensuring visitors and search engines always use the secure version of your site.
  4. Save the file and test your website by visiting http://yourdomain.com.au to confirm it automatically redirects to HTTPS.
Always back up your .htaccess file before making changes. Test your redirects thoroughly after saving to ensure no redirect loops occur and that all pages load securely.

Implement HSTS (HTTP Strict Transport Security)

  1. HSTS tells browsers to always connect to your site using HTTPS, even if a user types http://.
  2. Add the HSTS header to your .htaccess file or server configuration.
  3. Only enable HSTS after you have confirmed that your entire site works correctly over HTTPS and that your SSL certificate is valid.
  4. Test your site thoroughly after enabling HSTS, as it can prevent access if your certificate expires or is misconfigured.

Troubleshooting

Warning Persists After Updating URLs

Cloudflare Flexible SSL Mixed Content Issues

Green Padlock Still Not Showing

Update Search Console and Analytics After Migration

  1. Add the HTTPS version of your website as a new property in Google Search Console.
  2. Submit your updated sitemap to help Google index your secure pages.
  3. Update your Google Analytics property settings to use the HTTPS URL.
  4. Monitor Search Console for any coverage or indexing issues after the migration.
Incorrect redirects or missing canonical tags during an HTTPS migration can impact your SEO rankings. Ensure all HTTP URLs redirect to their HTTPS equivalents and verify your settings in Google Search Console.
Remember — If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.

Still Having Issues?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket