Technical SEO · 8 min read

HTTPS, HSTS and redirects: one version of your site for Google

http, https, with www and without: four addresses for the same site. How to keep one and make Google understand it.

Why do HTTPS and redirects matter for SEO?

Because your site can answer at four different addresses (http, https, with www and without) and Google treats them as different URLs. With HTTPS everywhere, permanent redirects to one version and HSTS, you concentrate signals on one URL and protect your visitors.

Google announced in 2014 that HTTPS is a ranking signal. More important than the signal itself: a single version avoids duplicate content and split links.

Which redirect should you use in each case?

CodeTypeWhen to use it
301 / 308PermanentLasting change: http to https, new domain, a URL that changed for good
302 / 307TemporaryPromotions or maintenance; Google does not treat it as a canonical signal
meta refresh / JavaScriptClient sideOnly if you cannot configure the server

According to Google's redirects documentation, a permanent redirect signals that the target should be canonical, and a server-side redirect has the highest chance of being interpreted correctly.

How do you check your site step by step?

One version

  1. 01

    Try all four addresses

    Open http://, https://, with www and without. All four should end at the same URL.

  2. 02

    One hop

    Each variant should reach the target with a single redirect, not a chain of two or three.

  3. 03

    Permanent, not temporary

    Make sure the redirect returns 301 or 308, not 302.

  4. 04

    Consistent canonical

    Each page's canonical tag should point to the final https version.

  5. 05

    Links and sitemap up to date

    Your sitemap and internal links should use the final URL, not the one that redirects.

  6. 06

    Turn on HSTS

    Once everything works on HTTPS, add the Strict-Transport-Security header.

What is HSTS and how do you enable it safely?

HSTS is an HTTP header that tells the browser to always use HTTPS for your domain for the time you set, never going through http. The MDN documentation explains its three options:

HTTP header
Strict-Transport-Security: max-age=31536000; includeSubDomains
  • max-age: seconds the browser will remember to use HTTPS only (31536000 is one year).
  • includeSubDomains: also applies to every subdomain. Enable it only if all of them have HTTPS.
  • preload: asks to join the list browsers ship with. Getting off it is slow; read hstspreload.org first.

Which mistakes cost rankings?

The ones we see most: redirecting everything to the home page instead of the equivalent URL, using 302 for a permanent change, leaving redirect chains after several migrations and canonicals pointing to the http version. Check them in the SEO audit; an extra redirect also adds load time, as covered in Core Web Vitals.

Free tool · HTTPS, headers and redirects

The Market OS HTTPS, headers and redirects tool follows your domain's redirect chain, checks HSTS and canonical and tells you what to change. Meanwhile, see the other free tools on the way.

Tell me when it is ready →

Frequently asked questions

Will I lose rankings moving from http to https?

With page-by-page 301 redirects and updated canonicals and sitemap, Google consolidates signals on the new version. Expect some movement while it recrawls.

Is www or non-www better?

Google does not mind. What matters is choosing one and permanently redirecting the other.

301 or 308?

Both are permanent for Google. 308 keeps the request method; for regular pages 301 is the most common.

Does HSTS improve SEO?

It is not a documented ranking signal. It avoids trips through http and protects your visitors.

How long should I keep a redirect?

As long as there are links or visits to the old URL. For a domain change, keeping it for a long time is recommended.

Sources

Written by Samuel Hinojosa, WITS · Updated November 1, 2026 · Markdown

The Market OS character, in a lab coat, waves in front of the Minerva monument in Guadalajara on a sunny day.

Review with WITS

Want us to review it with you?

The free tool tells you what is missing. If you want WITS to prioritize and fix it with you, tell us what you want to achieve.

WhatsApp +52 56 6107 7931 · ventas@wits.mx

Message us on WhatsApp