OVH Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVH Community members.

HSTS or how to redirect domain http://domain to https://domain before https://www.domain


#1

Hello, I was testing my website here https://hstspreload.org and I got this error:

Error: HTTP redirects to www first

http :// domain (HTTP) should immediately redirect to https :// domain (HTTPS) before adding the www subdomain. Right now, the first redirect is to https :// www.domain. 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. http :// domain
  2. https :// domain
  3. https // www.domain

Now: by default, OVH redirects both the first and the second to www.

Is there any way to redirect to the second before www is loaded?

Any help is appreciated