Redirect NON-www to www for https
snippet in htaccess

Redirect NON-www to www for https

user2920

RewriteCond %{HTTPS} !on [OR]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) https://www.example.com%{REQUEST_URI} [L,R=301]