How to configure the SSL certificate in Magento 2

Reading Time: 4 minutes

There are many factors that matter when it comes to running an ecommerce store, which should be considered in the early stages of a business.¬†One of them is to provide your users with a secure platform where they don’t have to worry about their privacy.¬†Using SSL certificates to secure your online store has become standard practice in the online business sphere.

What is SSL?

The¬†SSL – Secure Socket Layer certificate¬†is used to secure a website, as it establishes an encrypted connection between the web server and a browser.¬†The biggest advantage of SSL is that the data between encrypted links always remains private.¬†In simple terms, adding the SSL certificate to the store means that you are¬†protecting the user’s private information such¬†as login credentials, credit card information and other sensitive data.

How to configure the SSL certificate in Magento 2

Magento is one of the most powerful and customizable e-commerce platforms. To add the Magento SSL certificate, you will need to purchase it first. Some hosting providers even offer it for free. There are two main steps you need to follow:

  • Install the SSL certificate
  • Enable the SSL certificate

Let’s see them both together.

Install the SSL certificate

Here we will see how to install Magento SSL on a shared hosting server

Shared Hosting

Go to the cPanel and click on SSL / TLS in the Security section:

cpnel-certificato-ssl

This will redirect you to the SSL / TLS page. You need to click Generate, View, Upload or Delete SSL Certificates:

ssl-tls-magento

You will see¬†Let’s Encrypt SSL¬†already installed in the¬†Certificates on Server list¬†.¬†However, if not, you can contact their customer service and they will install it.¬†When¬†Let’s Encrypt¬†is enabled, the SSL certificate renewal process is done automatically.¬†According to their process, Let’s Encrypt SSL will renew itself every 90 days.¬†Now to add your purchased SSL certificate you need to follow a few steps.¬†First go back to the SSL / TLS page and click on¬†Private Keys¬†:

chiavi-private

Here generate a private key for the SSL certificate:

private-key-generation

Now go to Certificate Signing Requests (CSR):

generate-CSR-Hosting

Here you have to enter the details to create a CSR file which you have to send to the SSL provider. In return, you will get yourdomain.crt (certificate code) and yourdomain.ca (Chain File).

Now go to Certificates (CRT):

shared-hosting-CRT-certificate

Here you need to upload the certificate, paste the certificate body or just upload the .crt file you received from your SSL provider:

upload-ssl-certificate-hostgento-hosting

upload-ssl-certificate-hostgento-hosting - 2

Now, finally, go to Install and manage SSL for your site.

Select the domain and you will have the option to automatically fill in the required details or you can also add them manually which you got from the SSL provider:

install-ssl-hosting-hostgento

install-ssl-hosting-hostgento - 2

How to enable SSL in Magento

Enable SSL in Magento 2

To enable Magento 2 SSL, you need to go to¬†Stores ‚Üí Setup¬†from your store’s admin panel:

stores-configuration-Magento-2-

Click on Web:

web

Open the base URL section (safe) and update the fields in the same way as in Magento 1.x:

secure-base-url

Now select Yes for Use Secure URLs on Storefront and Use Secure URLs in the Admin fields:

selection

Then save the configuration

Enable SSL in Magento 1

Open the admin panel of your Magento store and then go to System → Configuration:

ssl-configuration-system

Click now on Web , in the General section

Open the Security section . First, update the base URL field by changing http to https . Then select Yes for Use secure URLs in the frontend and Use secure URLs in the Admin fields:

ssl-security-section

Use Protected URLs on Showcase : If you select Yes , all showcase pages will open with https.

Use secure URLs in admin : If you select Yes , your store admin panel will open with https.

Now click on the Save Configuration button

Andrea Saccà
FOUNDER Bhoost Hosting

Sharing tips and insights on Bhoost and Page Speed Optimization

Leave a Reply

Your email address will not be published.