How rule groups differ

Custom rules are a tool that lets you flexibly configure protection for your needs. Four rule groups are available:

They complement one another and let you configure different aspects of protection.

Rule group comparison

Rule group What you can configure Rule example Can block traffic When to use it

Rate limits

Request frequency: the number of requests one IP address can send to a specified URI within a set time. If the number of requests reaches the limit, the system blocks it temporarily.

A limit of 10 requests to /reports/generate within 5 minutes from one IP address. When the limit is reached, block access for 5 minutes.

Yes, when the limit is reached

Protect endpoints from overload.

Protect against business-logic abuse.

Enforcement

The system response: what to do with a request that matches the rule conditions: pass it, block it, present a JavaScript challenge, present a cookie challenge, or present a CAPTCHA.

When a request to /reports/generate comes from:

  • A human: pass it.

  • A likely human: present a JavaScript challenge.

  • A likely bot: present a CAPTCHA.

  • A bot: block it.

Yes, if you select the Block action.

Set the protection system response for a specific scenario.

Score collection

An additional user check: for the specified traffic, the system presents an additional JavaScript challenge and calculates the user’s bot score.

When a user sends a request to /reports/generate, present a JavaScript challenge and calculate the bot score.

No*

Increase filtering accuracy for specific scenarios.

Bot classification

Filtering strictness: the bot score threshold for the specified traffic. This is the minimum bot score at which a request source is placed in the Bot category.

When a user accesses /reports/generate and has a bot score of 0.4 or higher, consider the user a bot.

No*

Set filtering strictness for different traffic types.

Score collection and Bot classification do not block traffic directly, but they affect blocking indirectly. If a source’s bot score reaches or exceeds the threshold, the source is considered a bot. In Anti-bot mode, the system blocks bot requests by default.

Exception list

In Anti-bot mode, the system blocks requests from sources in the Bot class by default. The exceptions are:

  • Requests from IP addresses in the White list: they are always allowed.

  • Requests from verified bots, such as search engine crawlers: they are always allowed. You can disable automatic access for verified bots in Base settings.

  • Requests that match an enforcement rule you created. In the rule settings, you decide whether to pass or block these requests, present a cookie challenge or JavaScript challenge, or present a CAPTCHA.

  • Traffic that we allowlisted at your request, such as traffic from your mobile application. These requests are always allowed unless another higher-priority setting blocks them: the Black list, Geo restrictions, Rate limits, or Enforcement.

How rule groups work together

Suppose you have a /reports/generate page where users create complex reports. This operation requires significant computing resources. You want to protect against:

  • People who send an unusually large number of requests and may overload your system.

  • Bots that scrape information.

You configure the following rules:

  • Rate limits: 10 requests to /reports/generate within 5 minutes from one IP address. When the limit is reached, block access for 5 minutes.

  • Score collection: collect the bot score on the /reports/generate page.

  • Bot classification: set the bot score threshold for /reports/generate to 0.4.

  • Enforcement: when a request is sent to /reports/generate, pass requests from people and present a CAPTCHA to bots.

When a request arrives at /reports/generate, protection works as follows:

  1. It checks whether the IP address has previously sent requests to generate reports. If it has reached the limit of 10 requests within 5 minutes, the request source is blocked. Otherwise, the request proceeds to the next filtering stage.

  2. It presents a JavaScript challenge. If the user cannot complete it, the system considers the user a bot. If the user completes it, the system calculates the user’s bot score.

    If the user completed this challenge recently, the system has already calculated and stored the bot score. The user does not need to complete the challenge again.
  3. If the user’s bot score is between 0 and 0.3, the system marks the user as a human. If it is 0.4 or higher, the system marks the user as a bot.

  4. It allows requests from people to reach your servers. Bots receive a CAPTCHA in response to their request.

  5. If a user receives a CAPTCHA, the request is allowed only if the user completes the test successfully and the combined signals, including challenge-solving behaviour and client-environment data, indicate that a human completed the CAPTCHA.

Result: bots are blocked, and people can create reports freely as long as they do not send requests too often.

Where custom rules are located in the UI

Go to Application protection → Resources.

Open Resources

Find the resource for which you want to configure rules, click the ellipsis (…) at the end of the row, and select Custom rules.

Resource context menu

In this section, select the tab for the required rule group.

Some rule groups are enabled on request. If some tabs are inactive, contact support to enable them.
Rule group tabs