Fix "not fully secure" mixed-content warnings
Your site has a certificate, but the padlock shows a warning, or the browser says the page is "not fully secure". That's mixed content. The page loads over HTTPS but pulls something, such as an image or script, over plain HTTP.
What you see
| Browser | What it shows |
|---|---|
| Chrome, Edge | A padlock replaced by a "Not secure" label or tune icon. Images may be missing |
| Firefox | A padlock with a warning triangle |
| Safari | "Not Secure" in the address bar |
Scripts and stylesheets loaded over HTTP are blocked outright. That can break your menu, forms, or layout.
Find the offending files
- Open the page and press
F12(Windows) orCmd+Option+I(Mac). - Click the Console tab.
- Reload the page. Look for lines like these.
Mixed Content: The page at 'https://example.ca/' was loaded over HTTPS, but
requested an insecure image 'http://example.ca/wp-content/uploads/cake.jpg'.
This content should also be served over HTTPS.
The address at the end is the file to fix. Write down each one.
Fix it in WordPress
- Check Settings → General. Both WordPress Address (URL) and Site Address (URL) must start with
https://. See Change a WordPress site's URL if you can't edit them. - Update links stored in the database. Back up first. See Back up and restore WordPress. Then run this with WP-CLI. See Use WP-CLI.
wp search-replace 'http://example.ca' 'https://example.ca' --all-tables --dry-run
wp search-replace 'http://example.ca' 'https://example.ca' --all-tables
The first command only reports what would change. The second makes the change.
- Clear all caches, including LiteSpeed Cache. See LiteSpeed Cache explained.
- Check your theme and page builder settings. Some store their own URLs, such as a logo or a font link. Re-save them.
Fix it on a static or hand-built site
Change each http:// to https://, or use a path from the site root so the protocol follows the page.
<!-- Before -->
<img src="http://example.ca/images/loaf.jpg" alt="Sourdough loaf">
<script src="http://cdn.example.net/menu.js"></script>
<!-- After -->
<img src="/images/loaf.jpg" alt="Sourdough loaf">
<script src="https://cdn.example.net/menu.js"></script>
If the outside site doesn't offer HTTPS, host the file yourself or remove it.
Let the browser upgrade requests for you
Add this header while you clean up. It tells browsers to try HTTPS first for every link on the page.
<IfModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests"
</IfModule>
Put it in .htaccess in your site's main folder. This is a safety net, not a fix. Files that don't exist over HTTPS still fail.
Make sure visitors land on HTTPS
Visitors who type http://example.ca should end up on the HTTPS version. See Force HTTPS for your site.
If something goes wrong
- The Console shows no mixed content but the warning stays. Test in a private window. Browser extensions can cause it.
- Warning only on some pages. Content added by editors, such as old blog posts or embedded videos, may still use
http://. Search the database for the stringhttp://example.ca. - Fonts or icons missing. Check the Console for blocked requests to
http://fonts. Update the stylesheet link. - Issue only behind Cloudflare. Set Cloudflare's SSL mode to Full (strict). See Use Cloudflare with Barbrick hosting.
Still stuck? Ask us and we'll walk you through it.