You've installed an SSL certificate and your site loads at https://, but the padlock is missing, there's a warning icon, or some images and styles don't load. The most likely cause is mixed content.
What is mixed content?
Mixed content happens when a page loads over HTTPS, but some of its resources (images, scripts, stylesheets, fonts, videos or iframes) still load over plain HTTP.
For example, your page is https://yourdomain.com/about/, but it contains:
<img src="http://yourdomain.com/wp-content/uploads/team.jpg">
Browsers treat this as a security problem, because the HTTP parts could be intercepted or changed.
Two kinds
- Passive mixed content (images, audio, video): modern browsers often try to upgrade these to HTTPS automatically, or block them if they can't. Older browsers show a warning instead of a full padlock.
- Active mixed content (scripts, stylesheets, iframes): browsers block these, because they could change the whole page. This is what breaks layouts and menus.
Step 1: Find the mixed content
Use your browser's developer tools
- Open the page in Chrome, Edge or Firefox.
- Press F12 and open the Console tab.
- Reload the page. Mixed content warnings appear in the console, listing each insecure URL.
Check the padlock
Click the padlock (or warning icon) in the address bar. It may say the connection is not fully secure.
Check several pages
Mixed content is often specific to certain pages: an old blog post with hard-coded images, or a page with an embedded map. Check your home page, a few posts, and any pages with embeds or forms.
Step 2: Fix it in WordPress
Make sure WordPress uses HTTPS
In Settings > General, both WordPress Address (URL) and Site Address (URL) should start with https://.
Update old URLs in your content
Older posts often contain hard-coded http:// links to your own images. Fix them in bulk:
- Back up your database first. See backing up your website in cPanel and DirectAdmin.
- Install a reputable search and replace plugin.
- Search for
http://yourdomain.comand replace it withhttps://yourdomain.com. Do the same forhttp://www.yourdomain.comif you used it. - Run a dry run first to see what will change, then run it for real.
Use a proper search-and-replace tool rather than editing the database by hand. WordPress stores some settings in "serialized" form, which breaks if lengths change. Good tools handle this correctly.
Check your theme and plugins
If the insecure URL points to a theme or plugin file:
- Update the theme or plugin. Old versions sometimes hard-code
http://. - Check Appearance > Customize for logo or background images set with an
http://URL, and re-select them. - Check widgets and custom HTML blocks for hard-coded links.
External resources
If the insecure URL is on another website, such as an old embed, font or script:
- Change
http://tohttps://in the embed code, if that service supports HTTPS (most do). - If it doesn't support HTTPS, replace or remove it.
Clear your caches
After fixing, purge your caching plugin and browser cache. In LiteSpeed Cache, for example, use Purge All.
Step 3: Fix it on a custom or static site
- Search your files for
http://using your code editor, and update links to your own domain tohttps://, or use relative links like/images/logo.png. - Update any
http://links to external scripts or fonts to theirhttps://versions. - Check your CSS files for
url(http://...).
Step 4: Force HTTPS everywhere
Make sure visitors can't land on the HTTP version:
- cPanel: turn on Force HTTPS Redirect under Domains.
- DirectAdmin: tick Force SSL with https redirect under SSL Certificates.
Optional: upgrade-insecure-requests
As a safety net, you can tell browsers to automatically upgrade HTTP resource requests to HTTPS with this header:
Content-Security-Policy: upgrade-insecure-requests
It can be added in your .htaccess file on Apache-compatible servers, including LiteSpeed:
Header always set Content-Security-Policy "upgrade-insecure-requests;"
This doesn't replace fixing the links, because resources on servers without HTTPS will still fail. But it catches stragglers. Back up .htaccess before editing it.
Step 5: Check again
Reload your pages with the developer console open. When no mixed content warnings appear and the padlock shows normally, you're done.
Common causes at a glance
| Where it comes from | Fix |
|---|---|
Old posts with http:// images |
Search and replace in the database |
| Logo or header image | Re-select it in the Customizer |
| Outdated theme or plugin | Update it |
| Old embed code | Change to https:// or replace |
| CSS background images | Update url() in CSS |
Frequently asked questions
Will mixed content hurt my SEO?
Mixed content mainly affects how secure the page looks and whether resources load. Broken scripts or images can harm user experience, which matters for visitors and search alike. It's worth fixing promptly.
Why does the padlock look fine on one page but not another?
Mixed content is page-specific. A single old blog post or an embed can trigger it, while the rest of your site is fine. Check the pages that show the warning.
Do I need to fix links to other websites in my posts?
Ordinary links (<a href>) to http:// sites don't cause mixed content warnings, because they aren't loaded as part of your page. Only resources the page loads, such as images, scripts, styles and iframes, cause warnings. Updating links to HTTPS where available is still good practice.
The bottom line
Mixed content is just leftover http:// links. Find them in your browser's console, update them with a careful search and replace, update your theme and plugins, and force HTTPS. New to SSL? Start with what is an SSL certificate?