Using SSL Certificate is Important!
An SSL certificate is a data file hosted in a website’s original Hosting server. The certificate’s installation means that your website is available over HTTP and HTTPs both. However, the latter is preferred as it encrypts and secures your website’s data. It is recommended that you require all visitors to your website to access it through a secure connection. This is important because search engines may penalize you for not using SSL. They even give priority to search results with secure connections over the ones that do not have a secure connection. Therefore, forcing SSL via .htaccess is recommended.How to Ensure Greater Security?
To ensure greater security you should force HTTP to HTTPs on .htaccess on all pages. Here we talk about how to redirect HTTP to HTTPs in cPanel or htaccess. The .htaccess file is a configuration file which is hidden by default but can be viewed by clicking on view hidden files in the file manager section of cPanel. Use the code editor in the File Manager to add these lines in the beginning of the .htaccess file. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] However, if you wish to force SSL protection only on certain pages, you need to edit the .htaccess file specific to that domain. For more information on how to access the .htaccess, please see the related tutorial Once you have accessed the .htaccess file inside the file manager take the following steps:- Right-click on the .htaccess file and select the Edit option
- Click the Edit button on the pop-up message that appears
- At the top of the file- insert the following code
- Click on save changes
- Check your website to ensure that it is functioning properly. IN case of any problem, try using the below default cPanel code
Write A Comment