Many red opened locks around one closed blue lock

Webhostpython offers free SSL certificates for all of its customers. So if you’re a customer here, you have an SSL certificate and when visitors go to your website, they’re able to see the green lock symbol on their browser.

If you notice that your website only works in SSL when you directly go to the SSL version of the website, and want it to be automatic so that when any and all customers go to yourdomain.com, they get redirected to the SSL version of it, all you have to do is one of the following two things:

WordPress – Install the “Really Simple SSL” plugin.

This will allow you to force all traffic to redirect to your SSL version of your website.

Or modify your .htaccess file:

Login to your account via FTP and locate the .htaccess file that’s inside of your public_html folder
Edit the file
When you open it, you may see there is already code in there. Towards the top of the code before the rest of the code, put in:

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/.well-known/
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

This will then redirect everyone to the SSL version of your website when they visit your site!

If you have a WordPress website, you’ll need to edit the settings of your WordPress website and make sure to tell WordPress you want to use the SSL version of the website and not the non SSL version. Then you won’t have to do any of the .htaccess modifications shown in this tutorial.

Thank you!