Once SSL certificate has been added to the domain, all visitors to the site can be forced to use HTTPS to ensure the website traffic is secure. Below code can be used in .htaccess file:
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]