Setting up CAPTCHA 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1177
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

CAPTCHA Setup in 1C-Bitrix

CAPTCHA in Bitrix is primarily needed on registration, login, and contact forms — wherever bots create junk accounts or flood the mail queue. By default, the built-in CAPTCHA is disabled, and enabling it requires choosing the right type for the specific use case.

Built-in CAPTCHA and reCAPTCHA

Bitrix supports two options:

Built-in CAPTCHA — generates a server-side image with characters. Does not require external services, works offline. Enabled under Settings → Main Module → CAPTCHA. Downside: easily bypassed by modern recognition tools.

Google reCAPTCHA v2/v3 — integration via the main module. Setup:

  1. Register your site at google.com/recaptcha
  2. Obtain a Site Key and Secret Key
  3. Settings → Main Module → CAPTCHA → Type: reCAPTCHA
  4. Enter the keys

reCAPTCHA v3 runs in the background (no user interaction required) and returns a risk score (0.0–1.0). v3 support in Bitrix is available from version 22.0 of the main module.

Adding CAPTCHA to Components

Built-in Bitrix components support CAPTCHA via parameters:

  • bitrix:main.register — parameter USE_CAPTCHA = Y
  • bitrix:main.login — parameter USE_CAPTCHA = Y
  • bitrix:form (web forms) — checkbox in form settings: Use CAPTCHA
  • bitrix:sale.basket.basket — CAPTCHA at checkout (if enabled)

For custom forms, use the class \Bitrix\Main\Security\Captcha\CaptchaManager (the main module, available since Bitrix D7).

Real-World Case

A news portal with a comment form. Without CAPTCHA, 500–2,000 spam comments accumulated overnight — bots had discovered the endpoint. The mail queue (b_event) was flooded with notifications. Solution: integrating reCAPTCHA v2 into the comment component. The custom component required manually adding a call to CCaptcha::IsCaptchaValid() in the form handler. Spam dropped to zero.

Alternative: Honeypot

For forms where CAPTCHA hurts conversion (inquiries, callback forms), use honeypot fields — hidden fields that bots fill in but humans do not. Implemented in init.php via a form submission event handler. Requires no external services and is invisible to users.

Delivery Time

reCAPTCHA setup for standard components — 1–2 hours. With custom forms and honeypot — 3–4 hours.