Hi webmasters, I'm going https on all of my sites, but having issues and still not clear on how to solve it. While I can go specific on my case I will go a bit general on this so others can find some light too.
What do you need to go https?. You need a website (sure) a SSL certificate (free or paid), then configure the certificate on your server and do some changes so everything that points to your server ends up as https pages with 301 redirects. You will need to renew your certificate after it expires (you can get ssl for 30, 90 days and a year). I have covered all of that but experiencing issues.
The easiest way, Let's Encrypt. Their initiative allows you to get a free certificate, free as in "free" no tricks, why? there is a foundation, people moving white strings etc and donations so this can happen and the web can become a more secure place, so no tricks, it's free. Here you have two basic choices
1. Let's encrypt plug in.
This would appear on your webserver admin panel (example: cpanel), then you follow the specific documentation and it's done, it's the easiest way, I can't provide any more info about this because I don't have this feature and also, their documentation is pretty easy, you can find it online). Yes you can update and renew your certificate there too. There are tutorials on setting up a cron job to do the same, but that's something else.
2. Let's encrypt services on diff sites. There are some websites offering free tools (as in wizards) so you can enter there your info, generating our own CSR first on your server and pasting the code on their site. Some of those websites do this for you (just enter your url and wait), from the result of any of those processes you follow the instructions and then you have to validate your website to prove you are in charge, the website belongs to you. Once this is done the sites will give you the certificate for you to install on your admin panel (paste the cert), easy.
Now what lots of people are having trouble with: SSL on shared hosting.
So you follow the instructions, set up your SSL on your server and it works, but you have 3, 5, 10 websites on a shared hosting account. All the websites share the same IP address.
A. You can have one certificate per website. This can be expensive.
B. One free certificate for all your websites. Free = free but not all options might be available. So far after reading this is possible, and actually being able to set this up, I'm having trouble on making it work.
C. One separate free certificate for each website. Free = free. On some services you can get your free certificate, on others they can tell you "other certificate was already generated" and this is because your IP might have been detected on their system.
The problem I have found, and I'm reading lots of people are facing is about the same ip on shared server.
I have created a single certificate for all the websites, and also tried using a separate certificate for each website. Anyway, any of those two options ends up on the same issue. I have the following structure in my server
/ root folder (here are the files for my main website), web0
/ root folder / website1 / files for website1
/ root folder / website2 / files for website2
/ root folder / website3 / files for website3
After installing the certificate for site #1, I could see it was actually working, all fine. Then installed certificate for site #2, now I had issues. I got warnings on site #2 because the certificate belongs to another website "website#1". I didn't want to try yet on my main site.
Then I removed everything and tried on my main website (web0). Again, it worked, but then when I installed certificate for website #1 and #2, whenever I visited those sites using https, a warning was displayed about the cert belonging to web0. It seemed to me only one certificate can be applied effectively at once. In my panel I can make any certificate "primary" any time, and yes the same issue, I would get a warning unless I'm visiting that website exactly.
Read somewhere about creating a certificate for all my sites, so instead of feeding website1, I would enter website1, website2, website3 etc while generating the CSR, then generate the final certificate. Did that work? nope, it didn't. There is documentation some functions like SNI won't work on every browser, checked mine on the list and they are capable, but still doesn't work. So it's something on the server, the limitation of having just one ip.
So, one IP and you are stuck on your shared hosting? read articles stating it is possible, but you have to change things on your server software, I don't need to describe those are changes your server admin won't let you perform on the server. So that options are valid for shared servers you admin yourself.
Many articles and forum responses point to setting up:
A. Each website on diff ip addresses
B. Each website on diff ports (doesn't sound good to me)
But those might not be valid options for you, or anybody, because extra ips mean more money and several websites/clients don't exactly qualify on budget terms. Besides, I'm not saying we should always stay with free options but hey, is valid, and the SSL certs are not free, it doesn't make sense to just spend money without valid justifications or reasons.
Where I'm standing now. I've tried several approaches, but can't make this work, any help will be appreciated. Only some of my websites IMHO qualify on spending extra money going SSL, the rest... don't, so I'm researching to stay away from buying extra ip addresses. I have read lots (lots!) of pages and forum threads finding people who say this can be done, but there are no details, no info I can follow that works. Any light will be appreciated.
Is there a way to set this up for shared hosting? same ip address? what am I doing wrong?
I "managed" to get it working and test it on some urls, but then I got the problem of websites loading the wrong information, how? well the domain name became useless as everything was being loaded from the ip address (regardless of what site was being called) this has nothing to do with my htaccess. So, https on site#1, site#2 or site#3 loaded the root info on site0.
Thanks in advance any light will be appreciated.