Nexcess Logo

How to set up Magento 2 to use your SSL certificate

Knowledge Base Home

Notice anything different?

We've enhanced the appearance of our portal and we're working on updating screenshots. Things might look different, but the functionality remains the same.
September 11, 2019

How to configure your Magento 2 store to use SSL certificates using either the Dashboard or SSH.


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 your 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.

  3. On the Configuration page, from the General list, select Web.
  4. In the Base URLs (Secure) section, take the following action:

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

    2. In the User Secure URLs in Frontend drop-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

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

Jason Dobry
We use cookies to understand how you interact with our site, to personalize and streamline your experience, and to tailor advertising. By continuing to use our site, you accept our use of cookies and accept our Privacy Policy.