# .htaccess ######################################################################## #### ONLY ONE OF THE NEXT TWO BLOCKS BELOW IS FOR YOU! Don't copy both!! ######################################################################## # Redirect to https://www - PLEASE ADJUST YOUR DOMAIN NAME (RewriteRule line)! RewriteEngine on RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^/?(.*) https://www.example.com/$1 [R=301,L] # Redirect to https:// and eliminating leading "www" - ADJUST YOUR DOMAIN NAME (RewriteRule line)! RewriteEngine on RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} ^www\. RewriteRule ^/?(.*) https://example.com/$1 [R=301,L] ############################################################################################# #### NEXT LINES CAN BE DANGEROUS ! IF YOU DO NOT UNDERSTAND HSTS DO NOT USE THE LINES BELOW!! ############################################################################################# # Required in this form for deployment of your domain to internal browser lists using https://hstspreload.org/ Header set Strict-Transport-Security "Strict-Transport-Security: max-age=63072000; includeSubDomains; preload" env=HTTPS