I've recently set up a SSL certificate for one domain and it's somewhat easy if you have the right tutorials, since it depends on what's your setup (Apache, Nginx...)
For my final set up steps I wanted to redirect all incoming traffic to the new and secured https url, to do that after some search this is the best code I could find:
1 2 3 4 5 |
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L] |
If you're using WordPress put it at the top, be aware that you probably already have this RewriteEngine On line in your .htaccess files.