====== Force HTTPS and WWW ====== Put this to .htaccess #Force https: SetEnvIf X-Forwarded-Proto "https" HTTPS=on RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC] RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] #Force www: RewriteEngine on RewriteCond %{HTTP_HOST} ^DOMAIN.TLD [NC] RewriteRule ^(.*)$ http://www.DOMAIN.TLD/$1 [L,R=301,NC]