Spam Protection
Overview
The Spam Protection group decides which visitors must pass a CAPTCHA check before they can send a form. It also picks the CAPTCHA service that runs the check and lists email addresses your forms refuse. Set it up before you go live, or when spam starts to reach your Inbox.
Go to Stores → Configuration → MageMe Extensions → WebForms and expand Spam Protection. The page shows only the settings of the service selected in CAPTCHA Provider. Look at the Scope column: the two score settings are Global, all others can differ per store view.
Settings
| Setting | Scope | Default | Description |
|---|---|---|---|
| Require CAPTCHA for | Store View | Disabled | Which visitors must complete a CAPTCHA unless a form overrides this setting. Options: Guests Only, All Visitors, Disabled. |
| CAPTCHA Provider | Store View | reCAPTCHA | Options: reCAPTCHA, hCaptcha, Turnstile. |
| Blocked Email Addresses | Store View | One blocked email address or pattern per line, for example .*@example.com (regular expressions). |
Google reCAPTCHA
Get your keys at google.com/recaptcha. Shown when CAPTCHA Provider is reCAPTCHA.
| Setting | Scope | Default | Description |
|---|---|---|---|
| reCAPTCHA Version | Store View | v2 | Each version has its own keys. The settings cannot be saved until the selected version has its keys. Options: v2, v3 (invisible), Enterprise. |
| Theme | Store View | Standard | Options: Standard, Dark. Shown when reCAPTCHA Version is v2. |
| Site Key | Store View | Shown when reCAPTCHA Version is v2. | |
| Secret Key | Store View | Shown when reCAPTCHA Version is v2. | |
| Site Key | Store View | Shown when reCAPTCHA Version is v3 (invisible). | |
| Secret Key | Store View | Shown when reCAPTCHA Version is v3 (invisible). | |
| Invisible Badge Position | Store View | Options: Inline, Bottom Right, Bottom Left. Shown when reCAPTCHA Version is v3 (invisible). | |
| Minimum Human Score | Global | 0.5 | Accepts submissions scoring above this value, 0 to 1. 0 is likely a bot, 1 is likely a person. Shown when reCAPTCHA Version is v3 (invisible). |
| Site Key | Store View | Shown when reCAPTCHA Version is Enterprise. | |
| API Key | Store View | Shown when reCAPTCHA Version is Enterprise. | |
| Project ID | Store View | Shown when reCAPTCHA Version is Enterprise. | |
| Verification Action | Store View | webforms | Must match the action name configured for the reCAPTCHA Enterprise key. Shown when reCAPTCHA Version is Enterprise. |
| Invisible Badge Position | Store View | Options: Inline, Bottom Right, Bottom Left. Shown when reCAPTCHA Version is Enterprise. | |
| Minimum Human Score | Global | 0.5 | Accepts submissions scoring above this value, 0 to 1. 0 is likely a bot, 1 is likely a person. Shown when reCAPTCHA Version is Enterprise. |
| Checkbox Challenge | Store View | No | Shows the "I'm not a robot" checkbox instead of the invisible check. Shown when reCAPTCHA Version is Enterprise. |
| Rejected Check Message | Store View | reCAPTCHA verification failed. | Shown to visitors when the CAPTCHA check rejects their submission. |
| Service Error Message | Store View | Something went wrong with reCAPTCHA. Please contact the store owner. | Shown when the CAPTCHA service cannot complete the check. |
hCaptcha
Get your keys at hcaptcha.com. Shown when CAPTCHA Provider is hCaptcha.
| Setting | Scope | Default | Description |
|---|---|---|---|
| Theme | Store View | Light | Options: Light, Dark. |
| Site Key | Store View | ||
| Secret Key | Store View | ||
| Widget Size | Store View | Normal | Options: Normal, Compact, Invisible. |
| Maximum Bot Score | Global | 0.5 | Rejects submissions scoring above this value, 0 to 1. 0 is likely a person, 1 is likely a bot. |
| Rejected Check Message | Store View | hCAPTCHA verification failed. | Shown to visitors when the CAPTCHA check rejects their submission. |
| Service Error Message | Store View | Something went wrong with hCAPTCHA. Please contact the store owner. | Shown when the CAPTCHA service cannot complete the check. |
Cloudflare Turnstile
Get your keys at developers.cloudflare.com/turnstile. Shown when CAPTCHA Provider is Turnstile.
| Setting | Scope | Default | Description |
|---|---|---|---|
| Theme | Store View | Auto | Options: Auto, Light, Dark. |
| Site Key | Store View | ||
| Secret Key | Store View | ||
| Widget Size | Store View | Normal | Options: Normal, Compact. |
| Rejected Check Message | Store View | Turnstile verification failed. | Shown to visitors when the CAPTCHA check rejects their submission. |
| Service Error Message | Store View | Something went wrong with Turnstile. Please contact the store owner. | Shown when the CAPTCHA service cannot complete the check. |
Notes
Require CAPTCHA for. On a new installation it's Disabled, so no form asks for a CAPTCHA. Guests Only asks visitors who aren't signed in to a customer account. All Visitors asks everyone. A form can use its own rule: in the form's settings, under User Experience, change Captcha Mode from Use Store Configuration. See Protect forms with CAPTCHA.
Keys. A form shows a CAPTCHA only after you enter both keys of the selected service. For reCAPTCHA v2 and v3 these are Site Key and Secret Key; for reCAPTCHA Enterprise, Site Key and API Key. Without them, a form that asks for a CAPTCHA refuses every submission with "Captcha is not set up on this store. Please contact the store owner." A form that doesn't ask for one keeps taking submissions. The admin then shows a system message at the top of the page: "WebForms captcha is switched on in store view name, but the keys for the selected captcha are missing, so captcha cannot work there." It names one store view, or Default Config when every store view is affected, and its link, Open the captcha settings, leads to this page. It appears when Require CAPTCHA for isn't Disabled, or when a form sets its own Captcha Mode to Guests Only or All Visitors. Only admins whose role includes the WebForms settings see it. Enterprise also needs Project ID to check the answers; without it, submissions are refused the same way. Save Config refuses the selected service or version while one of its keys is empty and names the missing keys. reCAPTCHA keeps a separate set of keys for each reCAPTCHA Version. The page shows only the set of the selected version, and only that set is used.
Score settings. reCAPTCHA v3 and Enterprise rate each visitor from 0 (likely a bot) to 1 (likely a person). A submission passes only with a score above Minimum Human Score: a score equal to the setting is rejected. With Checkbox Challenge set to Yes, Enterprise shows the "I'm not a robot" checkbox and ignores the score. Maximum Bot Score works the other way round. It applies only when hCaptcha sends a score with its answer. A submission is rejected only with a score above the setting: a score equal to the setting passes.
Blocked Email Addresses. WebForms checks the address a visitor enters in an Email field. A blocked address stops the form with the message "E-mail address is blocked:" followed by the address. Put one entry per line:
- A full address, such as
jane@example.com, blocks that address only. Upper and lower case don't matter. - A pattern blocks every address it matches from start to end, such as
*@example.comor the hint's.*@example\.comfor a whole domain. Upper and lower case don't matter. You can also write a pattern between slashes, such as/@example\.com$/i. - A line that would match every address, such as
*or.*, is ignored.
If every submission fails the check, see Captcha blocks every submission.