Skip to content

Gift shoppingAn unfamiliar online shop? Check it for free before you pay.Check a shop

HTTP to HTTPS redirect check

How do you check that a website always redirects to HTTPS?

Short answer

It is enough to send one request to http:// and look at what comes back: it must be a redirect to an address that starts with https://. That is how Tegmia does it, and it deliberately does not follow the redirect — that first response is exactly what is measured. If the server hands out content over the unencrypted connection, or sends the visitor to another unencrypted address, we report it as a finding with high severity.

Part of the check Headers and HTTPS configuration.

What it is

Whoever types an address without “https://” first connects unencrypted. On public wi-fi such traffic can be overheard and altered, and before the browser receives the redirect, cookies without the Secure flag have already gone out in the request.

The redirect should be permanent (301 or 308) and apply to the whole domain, including the www variant. Browsers do not remember a temporary redirect.

A redirect alone does not close the gap completely. That takes HSTS, which tells the browser not to try an unencrypted connection at all.

How Tegmia measures it

What the check actually does, with the thresholds at which it reports a finding.

  1. We send one GET request to http://<your domain>/ and do not follow the redirect.
  2. We take the response as correct when it has a 3xx status and the Location header leads to an address with the https protocol.
  3. Otherwise we report http.no_https_redirect and put the status of the response and the Location value we received into the evidence.
  4. A server that refuses the unencrypted connection is fine, and we report nothing.
  5. When the connection times out or breaks, the address does not resolve, or the server answers with an error or a refusal (5xx, 401, 403, 407, 408, 425, 429), we have no answer and do not pretend otherwise: we leave the earlier finding as it is.
  6. On the HTTPS side we then follow the whole redirect chain and keep it as evidence. We check every hop again; the maximum is four.

What this does not measure

  • We measure the domain you entered. The variant with or without www we check only when you add it as a separate domain.
  • We test the home page. A particular section of the website may have its redirect set up differently.
  • We cannot tell port 80 where a firewall silently drops the connection from an outage. An earlier http.no_https_redirect then does not resolve by itself, even when the server no longer accepts unencrypted connections.

The findings this can lead to

Straight from the catalogue. You will see the same text in the report.

HTTP does not redirect to HTTPS

High

http.no_https_redirect · Headers and HTTPS configuration

Anyone who types the address without https communicates insecurely. On public Wi-Fi, such traffic can be intercepted and even altered.

What to do: Set up a permanent redirect (301) from http:// to https:// on the server for the whole domain, including the www version.

Default severity high: Plan it within a week. It makes a successful attack considerably more likely. The full rule in the catalogue

A typical misconfiguration

A redirect set up on only one variant of the domain. “yourdomain.com” redirects correctly, “www.yourdomain.com” stays on HTTP — or the other way round. It happens because the rule is written for one virtual host and the other does not inherit it.

The second situation: the redirect leads to https:// of a different address than the one the user went to, for example always to the home page. A link to a particular page then ends up elsewhere, and search engines read it as two different URLs.

How to fix it

Specific steps, in the order in which they make sense.

  1. 01Try both variants on the command line: a request to http://yourdomain.com/ and to http://www.yourdomain.com/. For both, look at the status and Location.
  2. 02Set up a permanent redirect (301) for the whole domain, including the www variant, and keep the path — do not redirect everything to the home page.
  3. 03Make sure the redirect does not apply to the path “/.well-known/acme-challenge/”, which certificate renewal uses.
  4. 04Only once the redirect works on every variant, add HSTS. In the opposite order you are asking for an unreachable website.

What it looks like

The values as you will write or see them.

The correct answer to an unencrypted request

HTTP/1.1 301 Moved Permanently
Location: https://yourdomain.com/

Check it on your own domain

We read only what the domain has published.

The scan reads the domain’s public records and configuration and shows the result of this check for you, including the evidence we based it on.

Situations this answers

Related checks

What goes with it and is usually done together.

  • HSTS check

    Which gap the Strict-Transport-Security header closes, what max-age value we expect and when not to turn HSTS on.

  • Security headers check

    The headers we read from your website's response, what each of them solves and in what order to introduce them.

  • SSL certificate check

    What one TLS connection reveals about a certificate: the issuer, the domain names, the key strength and the protocol version.

Last updated 3 November 2026. We write this page by hand and correct it when what we measure changes. Found a mistake? Tell us via the contact page.