Use code MAG25 to get $25 off! Limited time offer on Cloudways Magento hosting.
AVAIL NOW

How to Enable SSL in Magento 2

There are many aspects of running a successful ecommerce store that should be considered in the early stages of a business. One of the key factors is to provide your users a secure platform where they do not have to worry about privacy. Using SSL certificate to protect your online store has become a standard procedure in the retail industry.

What is SSL?

SSL- Secure Socket layer certificate is used to secure a website as it establishes an encrypted link between the web server and a browser. The biggest advantage of SSL is that the data between encrypted link always remain private. In simple words, adding SSL Certificate to the store would mean that you are protecting the user’s private information such as login credentials, credit card information, and other sensitive data.

Enabling SSL in Magento 2

Magento 2 is one of the most powerful and customizable ecommerce platforms. In order to add SSL certificate to your Magento 2 store you will need to first buy it. Once you’ve purchased the certificate and installed it, you can move on to enabling it in your Magento 2 store.

Let’s get started!

Go to Stores → Configuration from the admin panel of your store:

Stores - Configuration

Now click on Web under General Tab:

click on web

Unfold the Base URLs (Secure) section and update the Secure Base URL field by changing http to https:

secure base url

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

select yes

Use Secure URLs on Storefront: By selecting Yes, all of your storefront pages will open with https.

Use Secure URLs in Admin: By selecting Yes, your store admin panel will be open with https.

Lastly, just click Save Config:

save configuration

Final Words

SSL is one of the most useful and important layers to secure your Magento 2 store. Following this simple tutorial, you should now be able to enable SSL and redirect your Magento 2 store from http to https. If you have any questions, feel free to use the comment box below!

About Author

Syed Muneeb Ul Hasan is an expert in PHP and Magento, he prefers to educate users in implementing and learning Magento. When not working, he loves to watch cricket.