When I type example.com
in the URL it first redirects to http://example.com
then to https://example.com
and finally to the https://www.example.com
(the original address).
Why doesn't it straight away redirect http://example.com
to https://www.example.com
? Otherwise the direct traffic of my website has to go through one extra redirection causing slow load time.
.htaccess
- this should not cause a "slow load time") - in fact, this double redirect (1st to HTTPS on the same host) is actually a requirement if you plan on implementing HSTS in the future. These should also be 301 redirects, so the browser will cache them. Aside: "it first redirects tohttp://example.com
" - that's not a "redirect", it's simply the initial request (but I guess from your later text that you already know that.)