Forcing SSL and WWW using .htaccess – Stack Overflow .htacces tweaks, SSL serificats, WordPress TweaksRewriteCond %{HTTPS} off [OR]RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301] Source: Forcing SSL and WWW using .htaccess – Stack Overflow