Securing a Magento website with SSL
If your webshop has an SSL certificate, you set Magento to run the storefront and the admin over https://. Your customers then see the padlock in the address bar. This article is for a Magento webshop that you manage yourself. The Magento admin is in English; the button names below are those of Magento 2.4.
Log in to Magento
Log in to the admin of your Magento webshop with your Username and Password and click Sign in.
Open the configuration
In the menu on the left, click Stores and then, under Settings, Configuration.
Open the web settings
On the left, under General, click Web.
Check the base URL
Expand Base URLs and make sure the value of Base URL starts with
https://.Check the secure base URL
Expand Base URLs (Secure) and make sure the value of Secure Base URL starts with
https://.Switch on secure URLs
Set Use Secure URLs on Storefront and Use Secure URLs in Admin to Yes.
Save
Click Save Config at the top right. At the top, the message One or more of the Cache Types are invalidated: … Please go to Cache Management and refresh cache types. appears.
Flush the cache
In that message, click Cache Management and then, at the top, Flush Magento Cache.
Video

Related articles
Thank you for your feedback.

