RewriteEngine on RewriteCond %{HTTP_HOST} ^yourwebsite\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.yourwebsite\.com$ RewriteRule ^(.*)$ "https\:\/\/yourwebsite\.com\/$1" [R=301,L]