In Magento 2, I need to redirect the store to login page when user enters the store address instead of homepage.

1 Answer 1


For the Enterprise Version, we can do it easily by configuration: STORES > Configuration > General > Website Restrictions

But, for the Open source version, we need to implement our own logic. We can see a simple example here: Magento 2 - Redirect user to a specific page if not logged in

  • I Don't perform any login operation. i just need to redirect from Home page to login page. Like if user enter store address, ex: localhost/magento2 instead of homepage, it should display login page (like setting the permission) without login, customer must not see the home page details.
    – prashanth
    Commented Nov 24, 2017 at 12:32
  • yes, I think the link I gave you is your need. Commented Nov 24, 2017 at 12:35

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.