Use the following code in the htaccess file for making sure that all pages served up are www and SSL.
This will resolve any canonical issues in regards to SEO.
NOTE: if your site is using NON-WWW, then only use the first part of the code to determine port 80, otherwise you will end up with a redirect loop.
######################################
# force ssl and www
# https://www.jucra.com/whmcs/knowledgebase/49/
######################################
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^{HTTP_HOST} [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NC]