Skip to content
Nazmul Nikhil
Menu

HTTPS/HTTP Mixed Content (Ahrefs): Find and Fix Insecure Resources

Mixed content means a secure HTTPS page loads images, scripts or styles over insecure HTTP. Browsers block or warn about it. Here's how to find and fix it.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 2 min read
HTTPS/HTTP Mixed Content (Ahrefs): Find and Fix Insecure Resources
Photo: FlyD on Unsplash

In short

Ahrefs flags "HTTPS/HTTP mixed content" when an HTTPS page loads resources such as images, scripts, stylesheets or iframes over plain HTTP. Browsers block insecure scripts and styles, which can break the page, and may upgrade or flag insecure images. Fix it by changing every resource URL to HTTPS, usually with a search-and-replace in the database or templates.

After moving a site to HTTPS, old content often still points to images, scripts or stylesheets with http:// addresses. That's mixed content.

Why it matters

  • Broken pages. Browsers block HTTP scripts, stylesheets and iframes on HTTPS pages, so layouts and features can fail.

  • Lost trust. Some browsers drop the secure padlock or show a warning.

  • Security. Insecure resources can be altered in transit by anyone on the network path.

Find it

The Ahrefs issue lists each page and its HTTP resources. On a single page, open DevTools > Console: browsers log a "Mixed Content" warning for every insecure resource.

How to fix it

  1. Check the resource works over HTTPS. Open its URL with https://. If it loads, update the link. If it doesn't, host the file yourself or find another source.

  2. Update hardcoded URLs in content, templates, theme settings and widgets.

  3. Add a safety net with this response header, which tells browsers to request HTTP resources over HTTPS:

Header always set Content-Security-Policy "upgrade-insecure-requests"

The header doesn't fix resources that don't exist over HTTPS, so do step 2 as well.

WordPress: make sure both URLs in Settings > General start with https://. Then replace http://yourdomain.com with https://yourdomain.com in the database, using a search-and-replace plugin or WP-CLI. Back up first.

Shopify: stores are HTTPS by default. Mixed content comes from hardcoded http:// links in theme code, product descriptions or app embeds. Edit them to https://.

Webflow and Wix: sites are served over HTTPS. Check custom code embeds and rich text for http:// image or script links.

Custom builds: store image paths as relative paths (for example /uploads/name.webp) instead of full URLs, so the protocol never gets hardcoded.

Common mistakes

  • Using a plugin that rewrites URLs on every page load instead of fixing the database. It adds overhead and hides the problem.

  • Forgetting CSS files. Background images inside stylesheets can also be loaded over HTTP.

This guide isn't affiliated with or endorsed by Ahrefs.

Sources and references

TAGSAhrefs Site AuditMixed contentHttps http mixed contentFix mixed content wordpress
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with On-Page SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com