How to Enable reCAPTCHA Bot Protection on LiteSpeed Web Server
LiteSpeed Web Server includes a powerful built-in feature that uses Google reCAPTCHA v2 to protect your websites from bots, brute-force attacks, spam submissions, and other automated abuse. When suspicious activity is detected, visitors see a simple “I’m not a robot” checkbox challenge.
This step-by-step guide shows you exactly how to set it up yourself.
Prerequisites
Access to your LiteSpeed WebAdmin Console (https://YOUR-SERVER-IP:7080)
A Google account
Step 1: Create Your Google reCAPTCHA v2 Keys
Go to the Google reCAPTCHA Creation Dashboard: https://docs.cloud.google.com/recaptcha/docs/create-key-website
Sign in with your Google account if prompted.
Fill in the form with these recommended settings:
Label: Enter something descriptive (e.g., “LiteSpeed Bot Protection – example.com”)
reCAPTCHA type: Select reCAPTCHA v2 → “Invisible reCAPTCHA badge” (This is the required v2 checkbox version for LiteSpeed)
Domains: Add your Server’s Hostname (e.g., hostname.example.com).
Important: In the advanced settings, make sure “Verify the origin of reCAPTCHA solutions” is unticked (unchecked). This setting must be disabled for the protection to work correctly across multiple domains or server-wide.
Click Submit.
Copy both keys that appear:
Site Key (public)
Secret Key (private – keep this secure)
Tip: Store the keys safely. You will need them in the next step.
Step 2: Log in to the LiteSpeed WebAdmin Console
Open your browser and go to: https://YOUR-SERVER-IP:7080 (Replace YOUR-SERVER-IP with your actual server IP address.)
Log in with your LiteSpeed admin username and password.
Note: If the page does not load, port 7080 may be blocked by your server’s firewall.
Step 3: Configure reCAPTCHA Protection
In the left-hand menu, navigate to Configuration → Server → Security.
Scroll down to the reCAPTCHA Protection section.
Update the following settings:
Enable reCAPTCHA: Set to Yes
Site Key: Paste the Site Key from Google
Secret Key: Paste the Secret Key from Google
Trigger Sensitivity: Integer 0-100 0 = disabled. 100 = trigger on every request. Higher value = more aggressive.
Max Tries: Max reCAPTCHA attempts before IP is blocked (403). Default: 3. Raise to 4-5 if legitimate users fail too often.
Verification Expires (secs): How long a successful reCAPTCHA remains valid. Default: 86,400 (24 hours). Lower for more frequent challenges.
Allowed Robot Hits: Hits per 10 seconds allowed for good bots before they may trigger reCAPTCHA. Default: 3. Increase to 10–20 if crawlers are being challenged.
(Optional) If you have a bot whitelist, add trusted bots, user-agents, or IP addresses here (one per line). Examples:
Googlebot
Bingbot
192.168.1.100
Google and Bing bots are automatically whitelisted by default.
Click Apply (top right), then Save.
Restart LiteSpeed:
Go to the main dashboard or top menu and select Graceful Restart (recommended) or Restart.
Your bot protection is now active!