Search…
Magento 2 Antispam Extension

Installation and User Guide for Magento 2 Antispam Extension

Table of Contents
  1. 1.
    • Installation via app/code
    • Installation via Composer
  2. 2.
    • General Settings
    • Rate Limiter
  3. 3.
    Frontend
    • Invalid Search
    • Rate Limiter

Installation

  • Installation via app/code: Upload the content of the module to your root folder. This will not overwrite the existing Magento folder or files, only the new contents will be added. After the successful upload of the package, run below commands on Magento 2 root directory.
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
  • Installation via Composer: Please follow the guide provided in the below link to complete the installation via composer.

Configuration Settings for Antispam

Go to Admin > Stores > Configuration > Scommerce Configuration > Antispam Catalog Search

General Settings

  • Enabled – Select “Yes” or “No” to enable or disable the module.
  • License Key – Please add the license for the extension which is provided in the order confirmation email. Please note license keys are site URL specific. If you require license keys for dev/staging sites then please email us at [email protected]
  • Black List – You can blacklist certain keywords from the search of your website. Enter omma separated blacklist words which you don’t want customers or crawlers to search on your website. For example "casino", "gambling" etc.
  • Disallow URLs– Select "no" to enter URL's in your website's search and "yes" to allow.
  • Disallow Foreign Words– Use this setting to define whether users can enter Foreign words in the search or not.
  • Disallow Numbers– Select "no" to allow customers to search with numbers and "yes" to disallow.
  • Disallow Special Characters– Select "no" to allow customers to search with special characters and "yes" to disallow.
  • Disallow repeated character– Select "no" to allow customers to search with repeated characters and "yes" to disallow. It prevents repeated letters in the search query.
  • Number of repeated characters - Enter the maximum allowed number of repeated characters
  • Message for invalid searches– Enter the message to be displayed when an invalid search is made by the customer.

Rate Limiter

  • Enabled– Select "yes" to block Ip address of the customers based on the number of searches performed in a specific time.
  • Number of seconds– Enter the time limit under which a user can make specific searches. If the number of searches exceeds this time limit then their IP will be temprorily blocked.
  • Number of searches– Enter the number of searches allowed for a user under the time restraint entered in the above setting.
  • Minutes to block IP– Define the Ip block time for users.
  • Log Enabled– Select "yes" to create logs under /var/log/antispamcatalogsearch.log
  • Message– Enter the message to be displayed when the IP of an user is blocked.

Frontend

When an user searches with diallowed character then the warning message appears on the frontend as shown below:-

Rate Limiter

When an user exceeds the search limit then the IP block message appears as shown below:-
Export as PDF
Copy link
On this page
Installation and User Guide for Magento 2 Antispam Extension
Installation
Configuration Settings for Antispam
Frontend