Setting up SSL on my Web

Hi,

I created my web page with bootstrap and currently is working fine. But now I'm trying to set up SSL on it and have some problems with it. SSL certificate is working also HTTPS version is working fine but if you visit the web by default it shows you the http version. I tried some redirects via htpacces but It shows always an error "too many redirects"

Can someone explain me how to set up so the web always load https version?

Hi k4l1p0,

This is what pair.com support told me to do with the .htaccess to force HTTPs -

RewriteEngine On

RewriteCond %{SERVER_PORT} !^443$

RewriteCond %{HTTP_HOST} prisonministry.org [NC]

RewriteRule ^(.*)$ https://www.prisonministry.org/$1 [L,R]

However, after trying it with the different browsers, it did not work with Chrome or Firefox. Warnings were displayed in those browsers.

Pair.com support responded with this - The first browser warning is regarding obsolete cipher suite. Through testing, we've found that Chrome doesn't want the following ciphers enabled:

  • 3DES
  • AES256

We can disable those, but unfortunately, removing those drops support for Windows XP users (includes IE6 and IE8), which is arguably outdated and end-of-life, but it still holds a considerable 20% or so market share in Web browser usage.

After much testing, I finally chose this to write in the .htaccess to force HTTPs -

RewriteEngine on

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://www.prisonministry.org/$1 [R,L]

It appears to work for all browsers in Windows 10 and Android. I do not know if it works in previous Windows versions. This code will change all http references to https, so any site that has a link to the http version of your site will automatically be changed to the https version.

You will have to change the reference of https://www.prisonministry.org to your site.

If my suggestions do not work and you have any problems, try contacting the support where you have the SSl setup.

where do i put the ssl certified files exactly

Add this code to your .htaccess file for any site you need it for, it's generic so it works on any site:

RewriteEngine On 
RewriteCond %{HTTPS} !=on 
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]

The person I got it from told me I didn't need to change the "SERVER_NAME" setting so I left it as it was and it's worked so far on any of my clients sites. Not sure how or why, just know it does lol.

Sorry I might seem a little stupid but where do I locate the htaccess file

You need to make it. Just create a text file (not in Word, but a plain text editor like notepad) and name it .htaccess making sure the dot is the first character. Then just copy and paste what I put above into the file and upload that to the main directory of your server/website where all the html files reside.

Well bootstrap studios cloud hosting system does not let me upload the file to it

You should contact support on this as not many of the regular users actually use this hosting service so not many are going to have the right answers for you.

You can redirect the http: protocol to https: like this

<script>
  if (window.location.protocol == "http:") {
   window.location.assign("https://yourwebsite.com");
  }
</script>

Here is an example http://red-waterfall-1965.bss.design

2 Likes

I used cloudflare for my domain so it already had ssl. The ssl is free too. You can do this.

1 Like