Make wordpress website HTTPS only using .htaccess

How do I make a website HTTPS only using .htaccess

  1. Open .htaccess for website using ftp
  2. Insert the following at top of .htaccess file:
  3. “#BEGIN Forcing https:
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
    #END Forcing https:”
  4. Save
  5. Overwrite existing .htaccess file

Leave a Comment