Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to properly change our website from Http to Https?

+5 votes
95 views
asked Oct 9 in Q2A Core by Gurjyot Singh
I want to know all the steps needed to shift my Q2A website from Http to Https. I know there are many people who did this on their websites so please share some info guys.

What are the steps needed?
What are the things I need to keep in mind while and before making the change?
How to do the redirects?
What are the problems one has to face (if any) for using Https?
Q2A version: 1.7.4

2 Answers

+5 votes
answered Oct 10 by bluegenel
In my experience there are three steps:

1. Install/Update SSL Certificate

2. Amend htaccess file

3. Amend all urls to relative and amend all urls to https

----

1. Install/Update SSL Certificate

You can buy a certificate or get one for free. I use sslforfree.com. This means I have to update the certificate more regular than a paid for certificate. The installation can be done from within your hosting package normally. I use cpanel.

2. Amend htaccess file

Put this at the very top of your htaccess file: This is what I use on my website.

If you don't get 'secure' in the address field in your browser it will probably be because you need to make all url's relative and not absolute.

DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

3. Amend all urls to relative and amend all urls to https

Self explanatory.
commented Oct 10 by MONKEY
good morning. all this is free or you have to pay? I say it because if I can do it then to work but the hosting charged me for it.can i do it for me same?
commented Oct 10 by bluegenel
You should be able to do this for free using sslforfree.com.
+2 votes
answered Oct 10 by Cyril Maher
edited Oct 10 by Cyril Maher
You can do it with Cloudflare, very simple in three steps:-
1- Link your website with cloudflare from your cPanel
2- When your site be active on cloudflare go to your cloudflare account and log in
3- Create two page rules to redirect http://www.yoursite.com & http://yoursite.com to https
...