Redirect without WWW to URL with WWW

if ( $host !~ ^www\. ) {
return 301 $scheme://www.$host$request_uri;
}