Showing results for 
Search instead for 
Did you mean: 

Customer login not working in https

Customer login not working in https

Hi Team,

In live server magento 2.4.3 project  i am facing the issue with https.For https customer login is not working ,It is not capturing the session.For http login is working but each time i have to clear the browser cookies.Do you have any solution related to this issue.


Re: Customer login not working in https

Change the Cookie Domain via the Configuration admin menu. Go to System > Configuration > General > Web, as per the screenshot.

Alternatively, you can change this by running these SQL queries.

For validating the cookie domain use this select query to get the configuration:

SELECT * FROM core_config_data WHERE path = 'web/cookie/cookie_domain';

After executing this query, we will get the results. Verify the 'value' column is the same as your domain. Update the value if it is not the same as your domain.

To update the cookie domain, use this query:

UPDATE core_config_data SET VALUE = "" WHERE path = 'web/cookie/cookie_domain';
If issue solved, Click Kudos & Accept as Solution.
LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool

Re: Customer login not working in https

Thanks for the reply ,I tried this solution but still not able to login with https .

Re: Customer login not working in https

To enable logging in Magento 1, the setting you need is located under System > Configuration > Advanced > Developer > Log Settings. The files system.log and exception.log will be created under MAGENTO/var/log/ once any error occurs.

Found this info in this short how-to. Hopefully, it will help.

Re: Customer login not working in https

You can solve it the following way

There are two ways to fix this problem.

If you are not going to be using a subdomain for cookie storage, you can save the cookie domain settings in Stores -> Configuration -> Web -> Cookie Domain as ( without a preceding period and parentheses.

If you plan to make your store future-ready and allow subdomain cookie storage, you should set the Cookie Domain as ( with a preceding period and without the parentheses. However, in your base URL under Stores -> Configuration -> Web -> Base URL, add www to your domain name such as and https in the secure base URL if you are using SSL (that you should).

Additionally, other Cookie Settings are as such: Cookie Lifetime - 86400 (From my understanding, you don't need this and can leave it blank and check "use system value" because now Magento retains the session for security reasons). Cookie Path - / Use HTTP Only - Yes Cookie Restriction Mode - Up to you. If you enable this, it will show the message on the front end asking the user's consent to store cookies.

Note: Once again, this one is for my own future reference purposes and for anyone who might stumble into this frustration just like I did.