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:
- Install a valid certificate covering all hostnames including www and non-www
- Update all internal links, canonicals, hreflang and structured data to HTTPS
- 301 redirect every HTTP URL to its exact HTTPS equivalent, one hop, no chains
- Update the sitemap to HTTPS URLs and resubmit
- Add the HTTPS property in Search Console; it is treated as a separate property
- 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.
- 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.
- 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.
- Update internal links and canonicals to the HTTPS versions. Relying on redirects for your own links leaves every internal hop going through a redirect.
- 301 redirect HTTP to HTTPS, page for page. Never to the homepage.
- Add the HTTPS property in Search Console — it is a separate property, and forgetting it means your data appears to stop.
- Submit the updated sitemap with HTTPS URLs.
- 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.
| Header | What it prevents | Caution |
|---|---|---|
| HSTS | Downgrade to HTTP after the first visit | Hard to undo. Start with a short max-age, raise it once stable |
| Content-Security-Policy | Injected scripts executing | The one most likely to break your site. Deploy report-only first |
| X-Content-Type-Options | Browsers guessing a file's type and executing it | Safe. Set it and forget it |
| Referrer-Policy | Leaking full URLs to third parties | Too strict and you lose referrer data in your own analytics |
| X-Frame-Options | Your pages being framed for clickjacking | Breaks 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.
- officialGoogle Search Central documentation — mobile-first indexing, HTTPS as a ranking signal, migration guidance and hacked-site recovery developers.google.com
- officialMDN Web Docs on HTTP security headers — the behaviour of HSTS, Content-Security-Policy, X-Content-Type-Options and Referrer-Policy developer.mozilla.org