You can use the htaccess ssl redirect code below to redirect all visitors to your SSL installed site to https.
Since different web server software such as Apache and Nginx are used on each server, 3 different alternative redirect codes have been added.
htaccess SSL Redirect Code
RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC] RewriteRule ^(.*)$ https://www.yoursite.com/$1 [L,R=301]
Alternative htaccess SSL Redirect Code
RewriteEngine On RewriteCond %{SERVER_PORT} !=443 RewriteRule ^ https://www.yoursite.com%{REQUEST_URI} [NS,R,L]
Another Alternative htaccess SSL Redirect Code
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
You can add the codes to the .htaccess file located in the root directory of your site, before the RewriteEngine On line.