Search Results :

×

Magento Website Restriction Setup Guide | Restrict Access to Your Store Based on Login, IPs, or URL Paths.

The miniOrange Website Restriction extension lets you lock down your Magento site so that only authenticated users or certain IP addresses can access it.
You can choose different modes of restriction (e.g. fully closed site, or private sales), define what should happen to visitors who are not allowed in (where they get redirected or what page they see), and also whitelist specific paths or IPs. Here we will go through a guide to configure Website Restriction extension for Magento 2.
Click here to read more about the Magento Website Restriction extensions extra features.

  • Purchase the miniOrange Magento Website Restriction extension from Magento Marketplace (Adobe Commerce Marketplace).
  • Go to My profile -> My Purchases
  • Please ensure you are using correct access keys (My Profile - Access Keys)
  • Paste the access keys in your auth.json file inside your project
  • Use the below command to add the extension to your project.
    "composer require {module_name}:{version}"
  • You can see the module name and list of versions in the selector below the extension module name.
  • Run the following commands on command prompt to enable the extension.
  • php bin/magento setup:upgrade

  • Navigate to Stores → Configuration → miniOrange → Website Restriction.
Magento Website Restriction - Go to Stores config

  • In the Access Restriction settings set this to Yes to activate the extension. If this option is set to No, the restriction feature will remain disabled, and the website will be fully accessible to all visitors.
Access Restriction settings - Magento Website Restriction

  • Once enabled, choose the Restriction Mode that determines how unauthenticated visitors are handled.
  • Selecting Private Sales option will force the unauthenticated visitors to be redirected to the login page.
Private sales - Magento Website Restriction

  • If you selected Private Sales as the restriction mode, you must configure a Startup Page. This determines where visitors are first redirected when they try to access restricted areas.
  • Selecting Login Form (302 Found) in the Start Up page from the dropdown will redirect the customer directly to the login page.
Magento Website Restriction - Login form 302 settings

  • In the Landing Page settings you can determine what restricted visitors will see.
  • Select 404 Not Found if you want to displays a standard 404 error page.
  • Selecting Custom CMS Page will displays the content of a selected CMS page, such as a “Members Only” or “Access Restricted” message.
Custom cms page - Magento Website Restriction

  • When the restriction is active, you can define the HTTP Response Code returned to visitors.
  • 200 OK if you want to display a standard 404 error page.
  • You can also select 503 Service Unavailable and this will indicate the site is temporarily unavailable (useful for maintenance or staging).
Magento Website Restriction - Service unavailable page

  • From the IP whitelisting you ensure certain users or networks always have access. You can then enter a comma-separated list of IP addresses, CIDR ranges, or wildcard patterns.
Magento Website Restriction - Path whitelisting

  • From the Path whitelisting settings you can allow access to specific URLs, such as help pages or contact forms, while keeping the rest of the site restricted. Enable Path Whitelisting and specify the paths in a newline-separated list.
  • Enable Path Whitelisting and specify the paths in a newline-separated list. This supports exact matches or wildcard patterns, allowing flexible control lke /contact /help/* /about-us. These pages will remain accessible to all visitors, even when restrictions are in place with this configuration.
Magento Website Restriction - Path whitelisting

  • Now, click on the Save Config in the top right corner and go to System → Cache Management and flush the cache to apply the changes.

Please reach out to us at magentosupport@xecurify.com, and our team will assist you with setting up the Magento Website Restriction Extension. Our team will help you with the setup and select the best suitable solution/plan as per your requirement.

ADFS_sso ×
Hello there!

Need Help? We are right here!

support