I'm trying to set HSTS up correctly on my website and it is currently "half-working", I need to find the correct way to redirect:
https://www.example.com finally to
Actually, the website has 1 redirect per URL version:
http://www.example.com301 redirect to
http://example.com301 redirect to
https://www.example.com301 redirect to
I now need to adjust the redirection through my
.htaccess making it result this way:
I tried a couple of times, but I always end up shutting the website down. Could you please help me to fix this?
Sorry guys, I forgot to mention something important: I have already installed HSTS and it is working on
example.com but when i test it as
www.example.com i get "Error: Subdomain , Error: No HSTS header , Error: HTTP does not redirect to HTTPS"
I'm testing it with hstspreload.org