If you have installed an SSL Certificate on your hosting account and wish to force all your web traffic to the https protocol, you need to copy and paste the following code into your .htaccess file. You will find the .htaccess file in the public_html directory of your web hosting cPanel.
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]