1

I have a magento version 1.9.2.4 installation with multiple store views with different urls. One new store view is now running with https in secure and unsecure base url. At this store many customers can't login, because there are two "frontend" cookies being set. One with the domain .domain.de, which is configured in the backend, and one with .www.domain.de. It's only that store with the ssl configuration, the other stores are running fine.

I read a lot of threads, but no one could help me out. My cookie configuration looks like the following:

Default Session Cookie Management

  • Cookie Lifetime: 86400
  • Cookie Path: /
  • Cookie Domain:
  • Use HTTP Only: Yes

Default Session Validation Settings

  • Everything is set to "No"

Store view Session Cookie Management

  • Cookie Domain: .domain.de

Are there any settings for stores running completely under https or is there anything else I can do?

Thanks in advance!

2
  • do you have n98-magerun.phar installed? Can you execute this n98-magerun.phar config:get web/ and share it on the chat. Then change your actual domain to dummy domain so you can keep it anonymous.
    – Ner
    Nov 27, 2017 at 8:20
  • No I don't have installed this Nov 27, 2017 at 13:02

4 Answers 4

0

Try to remove the Dot (.) in the cookie domain. Please note that subdomains will no longer receive the cookies, however, Magento doesn't make usage of Subdomains by default (except you've changed that).

This has helped me to login again. If you cannot login into the backend, you can do that manually by moving to your database and set the flag in the core_config_data table

1
  • 1
    Hi Max, I added the dot because I need the cookie at my subdomains Nov 4, 2016 at 12:31
0

You have to configure the subdomain for each of your store views. In case you have the following baseUrl setup:

Your Cookie Domains should be exactly the same as so:

  • de.example.com
  • en.example.com
  • it.example.com
3
  • The problem is, that i have to run the same store view under different domains. So i can't configure it like that Nov 22, 2017 at 9:38
  • And the URLs have to be the same? Aren't redirects possible? Nov 23, 2017 at 6:24
  • No, the urls are different, but I only have one store view to configure a cookie domain. So I can't set a cookie domain for each subdomain. Nov 23, 2017 at 16:03
0

Firstly you must have a same Cookie Domain and for share cookies between http and https you have to do a server configuration

see https://stackoverflow.com/questions/2163828/reading-cookies-via-https-that-were-set-using-http

0

I've worked on a few Magento sites with this issue. If any of the 'easy' configuration changes based fixes don't work, an alternate solution is to forcefully clear both frontend cookies on the login page.

The javascript to clear cookie by name 'frontend' would be easy enough something like this would work https://stackoverflow.com/questions/10593013/delete-cookie-by-name

1
  • Hmm, seems to be a solution, but I don't like it so much ;-) Nov 23, 2017 at 16:04

Your Answer

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

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