At the moment, with preferred domain set to www.domain and Permanent SEO-safe 301 redirect from HTTP to HTTPS switched on, Plesk redirects
http://domain -> https://domain -> https://www.domain
The middle step is completely unnecessary, and the redirect should use
http://domain -> https://www.domain
This could be done with a
rewrite ^(.*)$ https://www.domain$1 permanent;
like what Plesk uses when only preferred domain is active, instead of the
return 301 https://$host$request_uri;
Plesk uses when the http->https redirect is activated.
http://domain -> https://domain -> https://www.domain
The middle step is completely unnecessary, and the redirect should use
http://domain -> https://www.domain
This could be done with a
rewrite ^(.*)$ https://www.domain$1 permanent;
like what Plesk uses when only preferred domain is active, instead of the
return 301 https://$host$request_uri;
Plesk uses when the http->https redirect is activated.