# Adding CAPTCHA protection to an OpenCart site

> Turn on a CAPTCHA extension in OpenCart and apply it to registration, login and contact forms to block spam bots.

Source: https://helpcenter.ruachost.com/apps/opencart/adding-captcha-protection-to-an-opencart-site/

CAPTCHA protection helps secure your OpenCart store by reducing spam and blocking automated bots. On **ruachost.com**, you can enable CAPTCHA functionality directly from the OpenCart administration dashboard.

## Why Use CAPTCHA?

- Prevents automated spam registrations and form submissions.
- Protects login, registration, and contact forms.
- Adds an extra layer of security to your e‑commerce site.

## Steps to Add CAPTCHA Protection in OpenCart

### Step 1: Log in to OpenCart Administrator

- Use your administrator account to access the backend dashboard.

### Step 2: Enable CAPTCHA Extension

1. In the left sidebar, click **Extensions → Extensions**.
2. From the dropdown, select **Captchas**.
3. OpenCart provides two options by default:

   - **Basic Captcha** (no third‑party registration required).
   - **Google reCAPTCHA** (requires registration with Google).
4. Click **Install** next to the CAPTCHA option you want to use.

### Step 3: Configure CAPTCHA

- For **Basic Captcha**:

  1. Click **Edit**.
  2. Set **Status** to **Enabled**.
  3. Save changes.
- For **Google reCAPTCHA**:

  1. Register your domain at the Google reCAPTCHA Admin Console.
  2. Obtain the **Site Key** and **Secret Key**.
  3. In OpenCart, click **Edit** next to **Google reCAPTCHA**.
  4. Enter the keys in the appropriate fields.
  5. Set **Status** to **Enabled**.
  6. Save changes.

### Step 4: Apply CAPTCHA to Forms

1. In the left sidebar, click **System → Settings**.
2. Select your store and click **Edit**.
3. Go to the **Option tab**.
4. Scroll down to the **Captcha section**.
5. Choose the installed CAPTCHA extension from the dropdown.
6. Select the forms where CAPTCHA should be applied (e.g., Registration, Contact, Reviews).
7. Save changes.

> **Important Notes:**
- Always back up your site before enabling new security features.
- CAPTCHA should be applied to all public forms to maximize protection.
- For accessibility, consider using reCAPTCHA v2 “I’m not a robot” or reCAPTCHA v3 (invisible).
- Clear OpenCart cache after enabling CAPTCHA to ensure changes are visible.
