Getting redirects right: http→https, www and loops
A redirect is the shortest road between two addresses — and the longest road between a visitor and a mistake. Someone types example.com, the server answers with a status code and a new address; how often that happens, which codes stand in between and where the chain ends is not a feeling but a series of answers you can measure.
Three classic mistakes cover nearly everything that goes wrong: http that does not reach https in one hop, www and bare taking turns as if they were two sites, and a chain that returns to an address it already visited — a loop. All three have their own signature in the chain itself, so all three are recognisable in one measurement.
Start at the redirect chain: our server walks the chain hop by hop and the page draws status, target address, http version and time, with the other spelling standing separately beside it. What stands under it — the findings with their repair advice — comes from that same measurement, not from a poll of opinions.
1. http to https: one permanent hop, no detours
An http address meant to be secure should reach the https variant of that same address in one step: status 301 (or 308) to exactly the same place with https. Turn it into a detour via www, via an intermediate path or via a temporary 302, and every visitor — and every crawler — sees three answers where one would have sufficed, and search engines do not remember temporary jumps. The redirect chain counts the hops and calls a chain of more than two redirects an item of attention in itself.
Then set the Strict-Transport-Security header: it tells the browser to skip http, but it only works on a site whose redirects are already straight — the header repairs no loop, it only multiplies what already stands. The security headers checklist says what ought to stand; HTTP headers shows what your origin actually sets.
2. www or bare: pick one home base
example.com and www.example.com are one site only if you make them so: pick one spelling as home base — the place where the certificate, the content and the final 200 stand — and redirect the other spelling there in one hop. A chain that switches host halfway (bare to www to something else) is no style choice but proof that two policies are running at once.
Measure both spellings separately: the redirect chain asks the other spelling separately and shows where it ends up — bare and www belong on the same final URL. If both answer 200 on their own feet, your domain splits in two halves in the eyes of search engines; Domain hygiene judges the two spellings side by side, together with the DNS picture underneath.
3. Loops and chains too long: the end of the line is missing
A loop arises when two rules each think they are right: www points to bare, bare points to www, and the ball rolls between them until the visitor's browser gives up after a number of hops. That is never a browser problem — it is a server configuration fighting itself, and it shows in the chain itself: an address that comes back.
Our server follows at most four hops; a longer or returning chain is reported as incomplete, with the error text as the measurement noted it — we do not guess what stood afterward. That is the point of the honesty: a chain without a final answer cannot be judged on its end, but it can be named as the failure it is, with the repair in the server configuration.
4. Measure before you repair, measure after
The chain report is a baseline: keep the one from before the change (copy or download as JSON) and take the measurement again afterward. The report comparator lays the two reports side by side, so "did it get better?" becomes an answer with two dates — chain length, temporary hops and the grade of both measurements next to each other.
And a chain never stands alone: http→https, the headers that carry policy and the mail layer around your domain together make the site secure from outside; the securing a website checklist puts all layers on one page, with the measuring instrument per layer.