Contact
Site: US UK AU |

How to set up Magento 2 to use your SSL certificate

How to set up Magento 2 to use your SSL certificate

Overview
This article shows you how to configure your Magento 2 store to use SSL certificates using either the Dashboard or SSH.

Purpose

SSL certificates create an encrypted link between a server and a client. A functioning SSL allows users to transmit sensitive information between servers and browsers without fear of third-party eavesdropping. For more information about SSL certificates and how they function, see What are SSL certificates?

Using the Dashboard

If you have not already purchased an SSL certificate, either visit our website or contact our Sales Team, available 9 a.m. - 5 p.m. eastern time (ET), Monday through Friday. Otherwise, use the procedure below to configure Magento to use your SSL certificate:

  1. Log in to your Magento 2 Dashboard.

  2. Select Stores > Configuration (Figure 2).


    Figure 2. Magento 2 dashboard; Stores > Configuration.

  3. On the Configuration page, from the General list, select Web (Figure 3).


    Figure 3. Configuration page; General > Web.

  4. In the Base URLs (Secure) section, take the following action (Figure 4):


    Figure 4. Base URLs (Secure) panel; Secure Base URL and Use Secure URLs on Storefront entries.

    1. In the Secure Base URL field, enter “https://” followed by your domain.

    2. In the User Secure URLS in Frontenddrop-down list, select Yes.

    3. Click Save Config. Your store is now configured to use your SSL certificate.

Using SSH

  1. Login to your Nexcess server.
  2. Navigate to your Magento installation, but replace the bracketed placeholders accordingly:

    cd /home/[user]/[domain.tld]/html/

  3. Choose one, but replace all bracketed placeholders accordingly:
    1. Enable secure URLs in both the customer-facing and admin-only areas of your store:

      php bin/magento setup:store-config:set --use-secure=1 --base-url=”https://[domain.tld]”


    2. Enable secure URLs in the admin-only areas only:

      php bin/magento setup:store-config:set --use-secure-admin=1 --base-url=“https://[domain.tld]”

Additional resources

http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands-store.html


For 24-hour assistance any day of the year, contact our Support Team by email or through the Client Portal.

To purchase an SSL certificate, contact our Sales Team between 9 a.m. and 5 p.m. eastern, Monday through Friday.

Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to disable caching in Magento 2
Added on Wed, Oct 12, 2016
How to enable CAPTCHA for user creation in Magento 2
Added on Mon, Feb 19, 2018
How to change base URLs in Magento 2
Added on Wed, Jun 13, 2018
How to write redirect (301) rules for Magento 2
Added on Wed, Jan 27, 2016
How to set up CDN access for Magento 2
Added on Wed, May 16, 2018
How to reset Magento 2 admin passwords
Added on Fri, Jun 3, 2016
How to disable maintenance mode in Magento
Added on Fri, Dec 15, 2017
How to configure Magento 2 storefronts
Added on Wed, Dec 30, 2015
How to set the return-path email in Magento 2
Added on Thu, Apr 21, 2016
How to add admins in Magento 2
Added on Mon, Dec 12, 2016