DevHeads.net

Postings by Gabriella Pepe

HSTS and double redirect

Hello Users, I was testing my website here <a href="https://hstspreload.org" title="https://hstspreload.org">https://hstspreload.org</a> and I
received this error:

Error: HTTP redirects to www first

<a href="http://example" title="http://example">http://example</a> (HTTP) should immediately redirect to <a href="https://example" title="https://example">https://example</a>
(HTTPS) before adding the www subdomain. Right now, the first redirect is
to <a href="https://www.example" title="https://www.example">https://www.example</a>. The extra redirect is required to ensure that any
browser which supports HSTS will record the HSTS entry for the top level
domain, not just the subdomain.

As far as I can understand, the redirect, to be valid, should be done this
way:

1.