Redirect non-www http to https://www.

A browser can send whatever protocol against whatever hostname it chooses to. It’s up to the browser to follow future directives. A server will report whatever status code. It’s up to the browser to obey it. If [R] is specified without a specific status code, 302 is assumed. 302 is a temporary redirect.

RewriteRule ^(.*)$ https://www.DOMAIN-NAME/$1 [R=301] will recommend to the browser for the redirection to remain permanent. It’s up to the browser to obey it. Relying on %{HTTP_HOST} alone may redirect www.DOMAIN-NAME to www.www.DOMAIN-NAME, so we use the literal domain name here.

Later releases add support for HSTS. This can be configured by settings Account > Settings > SSL > Strict Transport Security > Always send HSTS headers.