How to Block Insecure Content in Chrome
In this article
Blocking insecure content (also called mixed content) in Chrome stops pages from loading resources like images, scripts, or iframes over unencrypted HTTP when the main page is HTTPS. This protects your data from being intercepted or modified by attackers. You can do this using Chrome's built-in settings and flags, with no extra software needed. Here's how.
What You'll Need
- A computer running Google Chrome (Windows, Mac, or Linux). The steps are similar on ChromeOS.
- Administrator rights to your user profile (not required, but helps if you want to change default settings).
Step-by-Step
- Open Chrome and access settings. Click the three-dot menu in the top-right corner, then select Settings. Alternatively, type
chrome://settingsin the address bar and press Enter. - Go to Privacy and Security. In the left sidebar, click Privacy and security. If you don't see a sidebar, look for a section named Privacy and security in the main settings list.
- Open Security settings. Click Security under the Privacy and security section. This page controls safe browsing and content protection.
- Scroll to the 'Secure Browsing' area. Look for a section labeled Secure browsing or Advanced. You'll see a checkbox or toggle for Always use secure connections. Turn this on. This automatically upgrades all HTTP requests to HTTPS and blocks any that can't be upgraded.
- Enable the strict mixed content blocking flag (optional but recommended). In the address bar, type
chrome://flagsand press Enter. A warning page appears—click Continue. - Find the mixed content flag. In the flags search box, type
mixed content. Look for a flag named Block mixed content or Strict mixed content checking. The exact name may vary by Chrome version; it often appears as Strict mixed content checking. - Enable the flag. Click the dropdown next to the flag and select Enabled. This forces Chrome to block all mixed content, including images, audio, and video, which are normally allowed by default.
- Relaunch Chrome. After enabling the flag, click the Relaunch button at the bottom of the flags page. Chrome will close and reopen automatically.
- Verify the setting. After relaunching, go back to
chrome://settings/securityand confirm that Always use secure connections is still on. Also, you can test by visiting an HTTPS site that has known mixed content (like some news sites with HTTP ads). In the address bar, click the lock icon. If mixed content is blocked, you'll see a message like 'Insecure content blocked' or a shield icon.
Common Mistakes
- Only enabling the flag without turning on 'Always use secure connections'. The flag alone may not block all mixed content types, especially images. Both settings work together for full protection.
- Forgetting to relaunch Chrome after changing flags. Flags only take effect after a restart. If you don't see changes, close and reopen Chrome completely.
- Assuming the lock icon means everything is secure. The lock icon can still appear even if some content is blocked. Always check the icon's details for a 'blocked' message.
- Changing flags on a managed device. If Chrome is managed by your school or employer, flags may be disabled or reset. You may need to ask your administrator.
Tips
- Use the shield icon for quick control. When Chrome blocks mixed content, a shield icon appears in the address bar. Click it to see what was blocked and, if you trust the site, you can choose to load the insecure content (not recommended).
- Keep Chrome updated. Chrome's security features improve with each version. Enable automatic updates to stay protected.
- For developers: If you're testing your own site, use Chrome DevTools (F12) and go to the Console tab to see specific mixed content warnings and which resources are blocked.
- Use an extension for extra control. While not required, extensions like 'HTTPS Everywhere' (now built into Chrome) can help enforce HTTPS on more sites. However, the built-in settings are sufficient for most users.
Troubleshooting
- I enabled the flag but mixed content still loads. First, ensure you relaunched Chrome. If it still persists, check if the site is using Service Workers that cache insecure content. Clear your cache and reload the page. Also, some mixed content (like favicons) may not be blocked even with strict settings.
- The 'Always use secure connections' option is grayed out. This can happen if Chrome is managed by an organization. Contact your administrator or check your enterprise policies. On personal devices, this is rare.
- I see a 'Not secure' warning on a site I trust. That means the site is served over HTTP entirely, not just mixed content. The setting only upgrades HTTPS pages; it doesn't force HTTP sites to become HTTPS. You can still visit them, but your connection is not encrypted.
- After enabling the flag, some sites break (images don't load). This is expected because the site is serving insecure content. To fix it, you can temporarily disable the flag, but the better solution is to contact the site owner and ask them to fix their mixed content.
- The flag doesn't appear in my version of Chrome. Google occasionally removes or renames flags. If you can't find it, rely on the 'Always use secure connections' setting alone—it blocks most mixed content in modern Chrome versions.
Frequently Asked Questions
What exactly is mixed content?
Mixed content occurs when a secure HTTPS page loads resources (like images, scripts, or iframes) over insecure HTTP. This can compromise the security of the page because the HTTP content can be tampered with.
Does blocking mixed content affect page performance?
It can slightly slow down page load if the browser has to block and then re-request resources, but the security benefit outweighs any minor performance impact. Most modern sites are fully HTTPS, so the effect is minimal.
Will this setting block all HTTP sites?
No. The 'Always use secure connections' setting only upgrades HTTPS pages to HTTPS. It does not block HTTP-only sites. To block all HTTP, you'd need a different approach, such as using an extension or a proxy, but that's beyond the scope of this guide.
Can I allow insecure content on specific sites?
Yes. When Chrome blocks mixed content, you can click the shield icon in the address bar and select 'Load insecure content' for that site. However, this is not recommended because it exposes you to risk. The choice is remembered per site.
Is this the same as Chrome's 'HTTPS-First Mode'?
Yes, 'Always use secure connections' is essentially Chrome's HTTPS-First Mode. It attempts to upgrade all navigations to HTTPS and blocks any that can't be upgraded, which includes blocking mixed content.
Do I need to do this on every device?
Yes, these settings are per-profile and per-device. If you use Chrome on multiple computers or phones, you'll need to enable the settings on each one. On mobile, the steps are similar but the flags page may not be accessible on all devices.