I am facing an "invalid form key. please refresh the page" when customer login and click on any add to cart button. the website on domain name and tried a lot of options like change max_input_vars values remove cookies etc. but issue not resolved. I am using a custom theme for the website. On mobile sometimes adding product to cart showing "your session has been expired".

1 Answer 1


Check core_config_data table in DB and make sure that web/cookie/cookie_domain is set up corretly.

If the domain of your store is domain.com then the value of web/cookie/cookie_domain should be the same.


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.