# Configuring leech protection in cPanel

> Set up leech protection in cPanel to stop people sharing logins to password-protected directories on your website.

Source: https://helpcenter.ruachost.com/cpanel/security/configuring-leech-protection-in-cpanel/

**Leech Protection** is a security feature in cPanel that prevents users from publicly sharing their login credentials for restricted areas of your website. If too many logins occur from the same account within a short period, cPanel automatically redirects or suspends the account to protect your site.

## Why Use Leech Protection?

- Stops users from **sharing passwords** for protected directories.
- Prevents **unauthorized access** to restricted content.
- Helps secure membership sites, private areas, or paid content.

## Steps to Configure Leech Protection

1. **Log in to cPanel.**
2. On the **Tools page → Security section**, click **Leech Protection**.
3. Select the **protected directory** you want to secure.
4. Configure the following options:

   - **Number of logins per user per 2 hours** → Set a threshold (e.g., 3 logins).
   - **Redirect URL** → Enter the page users will be redirected to if they exceed the limit (e.g., a warning page).
   - **Send Email Alert To** → Enter an email address to receive notifications when leech protection is triggered.
   - **Disable Compromised Accounts** → Check this box to automatically suspend accounts that exceed the login limit.
5. Click **Enable** to activate leech protection for the directory.

> **Note:**
- Leech Protection only works on directories protected by **Directory Privacy** (password‑protected folders).
- If a user exceeds the login limit, their account can be suspended automatically.
- Always set a **reasonable threshold** to avoid locking out legitimate users.
