>

HTTPS and Security Signals

HTTPS has been a lightweight ranking signal since 2014 and is now a baseline expectation. Getting the migration wrong causes far more damage than the signal is worth.

Why HTTPS Matters

HTTPS encrypts traffic between browser and server. The direct ranking benefit is small, but the indirect effects are not: browsers display prominent warnings on insecure pages, referral data is preserved, and several modern web features require a secure context.

Mixed content — an HTTPS page loading HTTP resources — triggers browser warnings and can block resources entirely. After migration this is the most common residual problem.

Migrating Without Losing Rankings

The migration itself is routine; the errors are consistent. Work through in order:

  1. Install a valid certificate covering all hostnames including www and non-www
  2. Update all internal links, canonicals, hreflang and structured data to HTTPS
  3. 301 redirect every HTTP URL to its exact HTTPS equivalent, one hop, no chains
  4. Update the sitemap to HTTPS URLs and resubmit
  5. Add the HTTPS property in Search Console; it is treated as a separate property
  6. Update Google Analytics, ad platforms and any hardcoded absolute URLs

Expect minor ranking fluctuation for a few weeks. Sustained loss usually indicates redirect chains or an incomplete link update.

Security Headers Worth Setting

Beyond the certificate, several response headers improve security posture:

  • HSTS — instructs browsers to use HTTPS automatically, removing the initial insecure request
  • Content-Security-Policy — restricts which resources may load, mitigating injection attacks
  • X-Content-Type-Options: nosniff — prevents MIME type guessing
  • Referrer-Policy — controls what referrer data is sent to other sites

These are not ranking factors. They reduce the chance of the compromise that would cost you rankings.

Hacked Site Recovery

A compromised site can be flagged in Search Console and shown with a warning in results, which removes effectively all traffic.

Recovery: identify and close the vulnerability, remove injected content and any spam pages created, check for backdoor files left behind, then request review in Search Console. Restoring from a backup without patching the vulnerability results in immediate reinfection.

The Migration Checklist, in Order

An HTTPS migration loses rankings when steps are done out of sequence, not when they are skipped. The order matters more than the completeness.

  1. Install and test the certificate on staging. Confirm the full chain serves, not just the leaf — an incomplete chain validates in some browsers and fails in others.
  2. Fix mixed content first. Every image, script, stylesheet and iframe must load over HTTPS. A single insecure asset breaks the padlock on the whole page.
  3. Update internal links and canonicals to the HTTPS versions. Relying on redirects for your own links leaves every internal hop going through a redirect.
  4. 301 redirect HTTP to HTTPS, page for page. Never to the homepage.
  5. Add the HTTPS property in Search Console — it is a separate property, and forgetting it means your data appears to stop.
  6. Submit the updated sitemap with HTTPS URLs.
  7. Only then enable HSTS. It is deliberately hard to reverse; enabling it before everything above is verified turns a mistake into a long one.

Headers Worth Setting, and What Each Actually Prevents

Security headers are cheap to add and easy to add wrongly. Each one prevents a specific thing, and knowing which is the difference between configuration and cargo cult.

HeaderWhat it preventsCaution
HSTSDowngrade to HTTP after the first visitHard to undo. Start with a short max-age, raise it once stable
Content-Security-PolicyInjected scripts executingThe one most likely to break your site. Deploy report-only first
X-Content-Type-OptionsBrowsers guessing a file's type and executing itSafe. Set it and forget it
Referrer-PolicyLeaking full URLs to third partiesToo strict and you lose referrer data in your own analytics
X-Frame-OptionsYour pages being framed for clickjackingBreaks legitimate embedding if you have any

Content-Security-Policy is worth the effort and is not a one-line addition. Run it in report-only mode for a fortnight, collect what it would have blocked, and only then enforce. Enforcing first is how a site loses its own analytics, its fonts, or its checkout.

Sources

What each claim on this page rests on. Entries are typed so you can see which are primary.

  1. officialGoogle Search Central documentation — mobile-first indexing, HTTPS as a ranking signal, migration guidance and hacked-site recovery developers.google.com
  2. officialMDN Web Docs on HTTP security headers — the behaviour of HSTS, Content-Security-Policy, X-Content-Type-Options and Referrer-Policy developer.mozilla.org

Ask an AI about this page

Opens your assistant with this page as the source, and a question rather than a summary. It will ask what you are building before it answers.

ChatGPTClaudeGeminiPerplexityGrok

Nothing is sent from here. The link carries only this page’s title and address.