To avoid duplicated content make sure your website is only available under one address (with www. or without / with http or https).
To redirect all http requests to https use the following code in .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://www.your-domain.com%{REQUEST_URI} [R=301,L]
</IfModule>
# BEGIN WordPress
To redirect all requests without www. to www. and use https put the following code in .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^your-domain.com$ [NC]
RewriteRule (.*) https://www.your-domain.com%{REQUEST_URI} [R=301,L]
</IfModule>
# BEGIN WordPress
Combining both rules would look like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://www.your-domain.com%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^your-domain.com$ [NC]
RewriteRule (.*) https://www.your-domain.com%{REQUEST_URI} [R=301,L]
</IfModule>
# BEGIN WordPress
Replace both your-domain.com with your domain.