I am using magento2.3.2

I'd like to use the https in the url to maintain the website secure. I haven't purchase any ssl certificate. I have used encrypted certificate and installed via putty. There shows https is enabled to your site. But i haven't found the url is with https.

Website url : [Depoto website][1]

I have instance in aws-lightsail and ubuntu server.

[1]: http://depoto.comenter image description here

3 Answers 3


First Check status:

select * from `core_config_data` WHERE `core_config_data`.`path` = "web/secure/use_in_frontend";

select * from `core_config_data` WHERE `core_config_data`.`path` = "web/secure/use_in_adminhtml";

Enable ssl:

php bin/magento web/secure/use_in_frontend 1
php bin/magento web/secure/use_in_adminhtml 1


UPDATE `core_config_data` SET `value` = '1' WHERE `core_config_data`.`path` = "web/secure/use_in_frontend";

UPDATE `core_config_data` SET `value` = '1' WHERE `core_config_data`.`path` = "web/secure/use_in_adminhtml";

Disable ssl:

php bin/magento web/secure/use_in_frontend 0
php bin/magento web/secure/use_in_adminhtml 0


UPDATE `core_config_data` SET `value` = '0' WHERE `core_config_data`.`path` = "web/secure/use_in_frontend";

UPDATE `core_config_data` SET `value` = '0' WHERE `core_config_data`.`path` = "web/secure/use_in_adminhtml";


php bin/magento c:f
  1. You need to set the both configuration to Yes:

  2. Now set URL value to https :

    bin/magento config:set web/secure/base_url https://depoto.com/
  3. Now run the following commands from the Magento root.

    php bin/magento cache:clean
    php bin/magento cache:flush
    php bin/magento indexer:reindex
    php bin/magento setup:upgrade
    php bin/magento setup:static-content:deploy -f
    sudo chmod -R 777 var/ generated/ pub/

You need to check if both of these configuration is set to 1 (true).


by executing

bin/magento config:show [config_path]

If one of them is not set (a message similar to Configuration for path: "web/secure/use_in_frontend" doesn't exist) or the value is 0, you need to enable by executing

bin/magento config:set [config_path] 1

After both configuration are set to 1, you need to make sure that your secure base URL is set to https://depoto.com/ instead of http://depoto.com/. Check it by executing

bin/magento config:show web/secure/base_url

If the value is not what you want (which means other than https://depoto.com/), you need to change it by executing

bin/magento config:set web/secure/base_url https://depoto.com/

Flush your cache after setting the proper configuration by executing

bin/magento cache:flush

After that, check your website if it is redirecting to https.

  • I have followed the steps which you have described above and flushed the cache too. When i change my base url from http to https, then the site is not getting opened. prnt.sc/uccfnp. then i reverted to http. then its fine as before Sep 6, 2020 at 5:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.