How to make wordpress login go automatically to https

by AnneE
3 replies
Hi, i have SSL set up on one of my sites and it was recommended to me that I also make the wp-login.php for that site redirect automatically to https://domainname.com/wp-login.php

How would I do that?

Thanks for the help,
Anne
#automatically #https #login #make #wordpress
  • Profile picture of the author phpg
    Add this to your .htaccess :

    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} wp-login\.php
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    {{ DiscussionBoard.errors[7304193].message }}
    • Profile picture of the author Kingfish85
      Originally Posted by phpg View Post

      Add this to your .htaccess :

      Code:
      RewriteEngine On
      RewriteCond %{HTTPS} off
      RewriteCond %{REQUEST_URI} wp-login.php
      RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
      Yup. In addition to that, I would also recommend password protecting the wp-admin directory. This will add an additional layer of security. Make sure the username & password for the directory itself are different from your Wordpress login info.
      {{ DiscussionBoard.errors[7304221].message }}
  • Profile picture of the author JayBansal
    Nothing to say more than use this plugin Wordpress HTTPS (SSL)
    {{ DiscussionBoard.errors[7308652].message }}

Trending Topics