Hi all,
Happy to see you all on my another blog-post
It’s not hard to understand why SSL has been considered a best practice for any website that is processing transactions with sensitive data such as social security numbers, credit card numbers, personal health records, or login credentials. Now, SSL is becoming a important standard for all websites, including those that do not necessarily process sensitive data’s such as money transactions or any sensitive data transfers
In market various kind of SSL certificates are available and all are doing their work good based on the encryption techniques followed by their algorithms
We all know after SSL installation website will starts to load from HTTPS instead of HTTP
But it will load from HTTP even after we install the SSL for our website
Because after SSL installation process we need to enable automatic HTTPS redirection to our website otherwise HTTPS will works only if we enter our website with HTTPS manually in the browser
And its typically an additional task to your users who are all visiting your website
Let see how to set this automatic redirection for our websites
In the hosting industry Linux and Windows hosting is available, So I;m going to explain you the Automatic redirection for the both hosting
1.cPanel – Linux Hosting :
Step 1:
Log on your corresponding cPanel account and open the file manager
In file manager jump into public_html folder which contains our website hosting files
Step 2:
In most cases .htaccess file will be there, If the .htaccess is not there you can create an .htaccess file using create a file option in cPanel
Also ,make sure you have enabled hidden files view option
Step 3:
Open a .htaccess file using Editor option, preferably Code editor is an best option
In the Editor mode paste the below code and its should be started from the first line
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Step 4:
Save the file and ext from the file manager
Now clear your browser cookies and caches and then try to access it from the browser without entering HTTPS
Now you can see your website starts to load from HTTPS automatically
Let see an steps for Plesk/Windows based hosting
2. Plesk- Windows Hosting :
Plesk is an another hosting control panel which is familiar in windows based hosting accounts
Step 1:
Log on your plesk control panel and access the file manager and go-to http_docs which will contains your website hosting files
Step 2:
Find the web.config file under the http_docs folder and open that file using Code editor option
Step 3:
Once you opened the file in Editor mode paste the below code in that file
<configuration> <system.webServer> <rewrite> <rules> <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Step 4:
Now we have done the process, we can check the same by clearing our browser cookies and caches
Tip : Some times you may see an warning in the browser as connection is not fully secure,
Its seems that some of the images on your website doesn’t redirected to HTTPS, this can be fixing by enabling HTTPS redirection for the images by contacting the web developer
See you on my another post…!!! Bye …!!!