HTTPS and SEO: Setup, Mixed Content and Hacked-Site Recovery

By Simon White ·

HTTPS is the encrypted version of HTTP, the protocol that moves pages between your server and a visitor’s browser, secured with a TLS certificate. For SEO it is a baseline requirement rather than a growth tactic: it protects visitors, avoids browser warnings, and is part of how Google judges page experience.

Most sites already have a certificate. The SEO problems come from half-finished setups: HTTP versions still live, mixed content, and, worst of all, a hacked site that gets flagged in search. This page covers all three.

Is HTTPS a ranking factor?

Yes, but a small one. Google announced in 2014 that it was starting to use HTTPS as a ranking signal, described it as lightweight, and said it carried less weight than signals such as high-quality content.

Google’s current page experience documentation frames it differently. It lists HTTPS among the things to check for a good page experience, says Core Web Vitals are used by its ranking systems, and says other page experience aspects don’t directly help a site rank higher. Read together, my take is this: switching to HTTPS won’t lift your rankings in any way you’ll notice, but there is no good reason to run a site without it as of late 2026. Visitors expect the padlock, browsers warn when it is missing, and modern web features often require a secure connection.

What does a correct HTTPS setup include?

A correct setup means every visitor and every crawler ends up on one secure version of each URL. Use this checklist:

  1. A valid certificate covering every hostname you use, including www and any subdomains. Many hosts and CDNs issue and renew certificates automatically. Make sure renewal is actually automatic, because an expired certificate triggers a full-page browser warning.
  2. Server-side 301 redirects from every HTTP URL to its HTTPS equivalent, in a single hop. See 301 vs 302 redirects for why the code matters and how to avoid chains.
  3. Pick one host (www or non-www) and redirect the other, so you don’t end up with four versions of every page.
  4. Update internal links, navigation and templates to HTTPS URLs, so users and bots skip the redirect.
  5. Self-referencing canonical tags on HTTPS URLs and an XML sitemap that lists only HTTPS URLs.
  6. Don’t block the HTTPS site in robots.txt. Google’s HTTPS announcement made this point directly.
  7. Verify both versions in Search Console. Google’s site move guidance treats HTTP to HTTPS as a site move and recommends verifying both variants. It also says you don’t need the Change of Address tool for this kind of move.
  8. Consider HSTS once everything works. This response header tells browsers to use HTTPS for your domain automatically. Turn it on only after you’re sure every subdomain supports HTTPS, because it is hard to reverse quickly.

Search Console also has an HTTPS report that shows which indexed URLs are served securely and which aren’t, which is a quick way to find stragglers.

What is mixed content and how do I fix it?

Mixed content is when a page loads over HTTPS but pulls some of its resources, such as images, scripts or stylesheets, over plain HTTP. Those insecure requests can be intercepted or altered, which undermines the security of the whole page.

web.dev’s guide to mixed content splits it into two kinds:

TypeExamplesRiskWhat browsers do
PassiveImages, video, audioAn attacker can swap images or track which pages a visitor viewsShow an insecure warning, may try to upgrade the request to HTTPS, or block it
ActiveScripts, stylesheets, iframesAn attacker can take over the page, steal credentials or redirect usersMost browsers block it by default

The practical effect for SEO is broken pages: a blocked stylesheet or script can strip your layout or break forms, and a “not secure” warning drives visitors away. To fix it:

  1. Open the page in Chrome DevTools and check the Issues tab or the console for mixed content messages.
  2. Crawl the site for resources loaded over http://. Theme files, old blog images and hard-coded embeds are the usual culprits.
  3. Change those references to HTTPS. In WordPress, a careful search and replace in the database handles old content.
  4. For third-party resources that don’t support HTTPS, find an alternative or host the file yourself.

Some sites also add the upgrade-insecure-requests Content Security Policy directive as a safety net. It asks browsers to request HTTP resources over HTTPS, but treat it as a backstop rather than a replacement for fixing the links.

What about security warnings?

Two different kinds of warning can hit a site. Browser warnings appear when the certificate is missing, expired or misconfigured, or when a page has insecure content; those are fixed with the setup steps above. The more serious kind is a warning that Google attaches when it finds your site has been hacked or is harmful.

Google reports these in the Security Issues report in Search Console. It covers three groups:

  • Hacked content: code, content or whole pages added without your permission, often spam pages or hidden links.
  • Malware and unwanted software: software that harms visitors’ devices, or links to harmful downloads.
  • Social engineering: deceptive pages, such as fake login forms, that trick visitors into giving up information.

These can lead to warnings in search results and browsers, and visitors rarely click past them.

How do I recover a hacked site?

Recovery means removing the cause as well as the symptoms, then asking Google to review the site. A cleanup that only deletes the spam pages usually gets reinfected within days. This is the order I work in:

  1. Contain it. Change every password: hosting, CMS admins, FTP or SFTP, database and DNS. Tell your host, who may be able to see how the attacker got in.
  2. Find the scope. Check the sample URLs in the Security Issues report, search Google for your domain plus spammy terms, and look for unfamiliar files, admin users and scheduled tasks.
  3. Clean or restore. Restore from a backup taken before the hack if you have a reliable one. Otherwise remove injected code and files by hand, then update the CMS, plugins and themes, and delete anything you don’t use.
  4. Close the hole. An outdated plugin or a weak password is the usual entry point. If you can’t find it, assume it’s still open.
  5. Fix it everywhere. Google says to fix the issue throughout the site. Fixing only the sample pages won’t restore visibility.
  6. Request a review. In the Security Issues report, explain the problem, what you did and the result. Google says most reviews take a few days to a few weeks, and you shouldn’t resubmit while a request is pending.
  7. Clean up search. Make sure spam URLs return 404 or 410, then watch the Pages report and your logs for weeks afterward.

Hacked-site cleanups are a big part of my “SEO Fire Fighter” recovery work, and the pattern is consistent: the sites that stay clean are the ones that fixed the entry point and kept software updated afterward. If this has already happened to you, SEO recovery services covers what that work involves.

FAQ

Will moving to HTTPS hurt my rankings?

Not if it is done properly. Expect some fluctuation while Google recrawls, but one-hop 301 redirects, updated internal links and HTTPS canonicals keep the move clean.

Do I need a paid SSL certificate?

For SEO, no. A free domain-validated certificate encrypts the connection just as well. Paid certificates add things like warranties or organization validation, which some businesses want for other reasons.

How do I know if my site has been hacked?

Check the Security Issues report in Search Console, search Google for your domain alongside spam terms, and look for unfamiliar pages, admin users or sudden spikes in indexed URLs.

HTTPS checks are part of every technical SEO engagement, and they sit alongside speed work such as Core Web Vitals within the wider technical SEO picture. If you see security warnings or mixed content on your site, contact Simon and get it sorted.

About the author

Simon White

Simon White is an SEO & AI consultant based in Encinitas, California, and co-founder of the digital marketing agency Local Blitz, which has served clients since 2009. A former electrical engineer with more than 15 years in SEO, he now helps businesses get found in Google and in AI answers through SEO, answer engine optimization (AEO) and generative engine optimization (GEO).

More about Simon →

Need help with this?

Get a clear SEO plan for your business

Simon has spent more than 15 years helping businesses rank and grow. Tell him where you are now and where you want to be.