301 Impact
To answer your primary question about losing Juice, yes, you lose a little bit of it. The problem is that all the external links will be using HTTP to your site and now all those links will include a 301...
An External Site has a link to one of my page: http://my.website.example.com/this-page
. Google finds that page on that Site and registers that link. At some point the GoogleBot spider decides to follow that link, it receives a 301. Register the destination of that 301 and add a small penalty to that link because of it. Yet later, it checks the 301 destination and finds my page. This time it worked as expected the spider got a page. The spider assigns that backlink juice to that page ranking, but with that small penalty because of the 301.
So in you current scenario, you'd be hit by the small 301 penalty. If you had a big site with many external links pointing to your site, you'll certainly notice an impact. If you have a small site with just a few external links and a few hits per month (like under 100,000) then you won't notice a thing. If you have a big site with millions of hits, you probably will notice a small change.
The way large sites do it is by:
- Having the two versions running simultaneously,
- Making sure to let Google Console know of both versions and which one is preferred (i.e. HTTPS in your case.)
- 301 redirect newly created pages--so in other words, never create additional HTTP-only pages after the switch (I don't know whether WordPress would have that capability?)
- Make sure that old pages on the HTTP website now show
"https://www.example.com/..."
in their canonical URL.
- Fix all the internal URLs that include the protocol (
http:...
) to now use the new protocol (https:...
)--for this, WordPress has plugins that will help when converting your site from HTTP to HTTPS.
I don't think WordPress allows you to do all of that without a lot of work. Like Google, WordPress sees both versions of the site as two separate websites and thus would probably not work correctly anyway. So really I would skip on it. Unless you have a million dollar website, it's probably not worth the trouble (a.k.a. additional costs) anyway.
About the redirect
If you can edit the .conf file instead of the .htaccess, you can add that redirect to your VirtualHost
instead. That allows you to remove the RewriteCond %{HTTPS} off
.
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
...other parameters...
RewriteEngine On
RewriteRule (.*) https://example.com/\1 [L,R=301]
</Virtual>
Here I redirect everything to https://example.com/
keeping the path untouched.
Note that I removed the ^
and $
since they are not needed. .*
by itself matches the whole path from start to finish. I think it also makes more sense to use \1
(and that's why you have the parenthesis!) since you just parsed that with the .*
.
On my end, I also started using the verbose version of the RewriteRule flags to make things clearer in my Apache code:
[last,redirect=permanent]
I don't show it above, but if you want to preserve the query string, you need the qsappend
as well:
RewriteRule (.*) https://example.com/\1 [last,redirect=permanent,qsappend]
That way http://www.example.com/?page=3
will work as well. Without the qsappend
it will just become https://www.example.com/
and no page information will show up... in other words, the user is sent to the wrong place. Google would probably not be happy about that!