Magento 2 Spam Bot Blocker

Introduction

Magento 2 Spam Bot Blocker extension allows you to block/restrict spambots from submitting forms in your Magento 2 site. 

Installation

The extension has 2 separate ways of installation via Composer or by copying the code.

Please follow this Installation Guide to install the extension.

Extension Configuration

Configuration Settings

To configure the extension, log into the Magento 2 Backend and go to STORES ⟶ Configuration ⟶ ULMOD EXTENSIONS ⟶ Spam Blocker

Form Restrict

Enable Spam Blocker? - choose the form to restrict type to use

  • If "Yes, Honeypot Restrict Type" is selected, the honeypot restricts type will be used in the selected frontend forms. Make sure to configure the honeypot settings
  • If "Yes, Email Adress Restrict Type" is selected, the email address restricts type will be used in the frontend. Make sure to configure the email restrict settings

Honeypot Restrict Type Settings:

Forms Controller Actions - Specify the action URL of all forms to enable the honeypot, one URL per line.

  • For "Newsletter Subscribe Form" use : newsletter/subscriber/new
  • For "Customer Registration Form" use : customer/account/createpost
  • For "Contact Form" use : contact/index/post
  • For "Product Review Form" use: review/product/post
  • For "Your Custom or Additional Forms": please check your form actions to use, or contact our support team if you need any assistance on it

Forms CSS Selector - Enter a comma-separated list of CSS Selectors for the forms (forms with actions specified in Forms Controller Actions field) to enable the honeypot. Eg. .form.subscribe, .form.form-create-account, .form.contact.

  • For "Newsletter Subscribe Form" use : .form.subscribe
  • For "Customer Registration Form" use : .form.form-create-account
  • For "Contact Form" use : .form.contact
  • For "Prodcut Review Form" use : .review-form
  • For "Your Custom or Additional Forms": please check the CSS selector of your custom/additional forms, or contact our support team if you need any assistance on it

Not Allowed or Restricted Message - Enter the message that will display to users that are not allowed to submit the form (spambots in most of the cases). For Eg "We are sorry, you can not submit this form for now. Our spam blocker tool has detected you as a bot. Please contact our team at [email protected] in case you are not a bot"

Email Adress Restrict Type Settings

Forms Controller Actions - Specify the action URL of all forms to restrict, one URL per line.

  • For "Newsletter Subscribe Form" use : newsletter/subscriber/new
  • For "Customer Registration Form" use : customer/account/createpost
  • For "Contact Form" use : contact/index/post
  • For "Product Review Form" use: review/product/post
  • For "Your Custom or Additional Forms": please check your form actions to use, or contact our support team if you need any assistance on it

"Individual Email Address" List To Restrict - enter a comma-separated list of individuall email addresses to restrict, eg. [email protected], [email protected], [email protected]

"Wildcard Prefix Email Domain" List To Restrict - enter a comma-separated list of wildcard prefix email domain to restrict. eg. *@qq.com, *@163.com, *@example.com, *@QQ.COM, *@yjhengxing.com, *@sina.com, *@cacnature.com, *@126.com, *@gmail.ru, *@yandex.ru, *@bk.ru, *@ukr.net, *@ya.ru, *@rambler.ru, *@list.ru, *@inbox.ru, *@yandex.by, *@gmil.com

Not Allowed or Restricted Message - Enter the message that will display to users that are not allowed to submit the form (spambots in most of the cases). For Eg "We are sorry, you can not submit this form for now. Our spam blocker tool has detected you as a bot. Please contact our team at [email protected] in case you are not a bot"

Logs

Log All Spam Blocked? - If "Yes", the list of all spam blocked will be logged/saved under "MARKETING -> Spam Blocker by Ulmod -> Manage Blocked Spams"

Auto-Clear All Spam Blocked After X Days - automatically clear spam blocked log older than X days. If you do not want to clear logs automatically, set this to 0.

Enable Report Notification - if 'Yes', you will receive daily logs of all spam blocked after the spam blocker cron job (ulmod_spamblocker_send_log_mail) has run.

Email Recipient - enter the recipient to receive spam blocked reports by email. eg. [email protected]

Bcc Email Recipients (Associated Admins or Users) - enter associated admins or any email id to receive spam blocked reports by email. Separate each email id by comma, eg: [email protected], [email protected]

Email Sender - choose the sender to use in spam blocker email

Notification Email Template - choose the spam blocker email template to use

Managing Spam Blocked Logs

To view, edit or create a new gallery, please go to CUSTOMERS ⟶ Spam Blocker by Ulmod ⟶ Logs

All existing spam bot blocked appears in the grid including date created, IP address, store view, restrict type, form data.

To delete a single spam log in the grid, click to Delete link in the Action column.

To delete all logs, click to "Clear All Logs" button on the upper-right side.

Frontend View

Honeypot Restrict Type

Magento 2 Spam Bot Blocker extension adds a hidden honeypot input field (eg. <input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none">) at any forms that was configured from the admin panel. 

For example, if  honeypot has been enabled on the contact form page, Magento 2 Spam Bot Blocker extension will add a hidden honeypot input field at the end of the contact form as follow :

<input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none">

When the contact us form is submitted :

1. Spammers/Bots:

If the hidden honeypot field is filled (mostly by spammers/bots) with any value. eg. value="123"  

<input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none" value="123">

 

 

the contact us form will fail to submit, and the Not Allowed or Restricted Message will show as follow:

 

2. Real Users/Customers/visitors:

If the hidden honeypot field is not filled (generally by real users/customers). Eg.

<input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none">

the form will be submitted with success, as follow

 

For Email Address Restrict Type

When the form is submitted:

1. if the email id filled in the form match any of the email address mentioned in the "Individual Email Address" List To Restrict" or "Wildcard Prefix Email Domain" List To Restrict" field in the backend, the form will fail to submit and the Not Allowed or Restricted Message  will display

2. if the email id filled in the form does not match any of the email address mentioned in the "Individual Email Address" List To Restrict" or "Wildcard Prefix Email Domain" List To Restrict" field in the backend, the form will submit with success

 

Example of Spam Blocked List Send by Email to Specified Recipients

Extension Support

Need Help?

Ulmod Support team is always ready to assist you, no matter which part of the world you are in. If something does happen and you think you might be experiencing an issue or bug, please contact us via [email protected] or submit a ticket from our Helpdesk Ticket and we will help you out.

Got Questions?

Should you have any questions or feature suggestions, please Contact Us. Your feedback is welcome!

Extension Product Page