How to configure leech protection in cPanel

This article describes how to use cPanel's Leech Protect feature to help prevent users from publicly posting their username and password.

What is leech protection?

When users publicly post their username and password, unauthorized visitors can use their credentials to access secure areas of your web site. This practice is known as leeching.

cPanel provides protection against leeching by limiting the number of times that a user can access a secure area of your web site within a two-hour period. For example, you can limit users to four logins over a two-hour period. If users exceed the login limit, you can redirect them to another URL, send an alert e-mail, or even disable their account.

Enabling leech protection for a directory

To enable leech protection for a directory, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. Open the Leech Protection tool:
    • If you are using the Jupiter theme, on the Tools page, in the Security section, click Leech Protection:

      cPanel - Security - Leech Protection icon

    • If you are using the Paper Lantern theme, in the SECURITY section of the cPanel home page, click Leech Protection:

      cPanel - Security - Leech Protection icon

  3. Click the name of the directory that you want to protect.

    You can click the folder icon next to the folder name to open the folder.
  4. Click Edit.
  5. Under Set up Leech Protection, type the number of logins allowed per username in a two-hour period.
  6. Type a URL to redirect users to another web page when their account is compromised.
  7. To receive an e-mail alert when an account is compromised, select the Send Email Alert to check box, and then type an e-mail address.
  8. To disable accounts that are compromised, select the Disable Compromised Accounts check box.
  9. Click Enable.

Disabling leech protection for a directory

To disable leech protection for a directory, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. Open the Leech Protection tool:
    • If you are using the Jupiter theme, on the Tools page, in the Security section, click Leech Protection:

      cPanel - Security - Leech Protection icon

    • If you are using the Paper Lantern theme, in the SECURITY section of the cPanel home page, click Leech Protection:

      cPanel - Security - Leech Protection icon

  3. Click the name of the directory for which you want to disable leech protection. Directories that have leech protection currently enabled have a small image of a shield next to them.

    You can click the folder icon next to the folder name to open the folder.
  4. Click Edit.
  5. Under Disable Protection, click Disable.

More Information

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.