Yes, it will. The http
and https
version will be seen as individual pages and thus also create duplicate content.
The solution is to use a 301-permanent redirect
, which your code does. This will transfer the juice to the destination of the redirection, so you're good. Also, adding a canonical tag
to indicate which is the prefered url is good practice.
There are some rumours that a redirect will cost you some value, but just the tiniest bit, nothing to worry about.
Might be worth mentioning that https
has more effects on SEO. Because of the increased security you'll get a higher authority rank, which could positively effect your ranking.
https
sites are theorically slightly slower, but in practice you will not notice this. Your implementation influences has much more effect on how much (e.g.: decrease number of resources).
Another factor will be your users. The users might trust your site more and stay longer because of that. More time on your website (often) equals a better ranking.