bot_verifier_enable_repsheet

Enables the use of a reputation sheet for verification of search engine bots in NGINX.

Syntaxbot_verifier_enable_repsheet on | off;
Defaultoff
Contexthttp, server, location
Arguments1

Description

The bot_verifier_enable_repsheet directive activates the module responsible for bot verification by utilizing a reputation sheet, which allows the system to validate if an incoming request is from a legitimate search engine bot. When enabled, this directive takes effect in the specified context (http, server, or location), allowing NGINX to leverage the reputation information stored in the Redis database (when configured) to assess the authenticity of bot requests. This mechanism is critical for mitigating the risks associated with misrepresented user-agent strings and ensuring that legitimate search engine crawlers are granted access while blocking unwanted or malicious actors.

When a request is received, the module checks the current configuration for the directive to determine if bot verification is active. If it is enabled, the verification process involves checking the request's originating IP address against the cache maintained in Redis, facilitating quick lookups to determine the verification status. The directive contributes to a performance-efficient operating environment as it helps avoid redundant checks against trusted lists or databases that can be time-consuming during peak web traffic periods.

If the lookup indicates that the bot is verified (success) based on the reputation sheet, access is granted. On the other hand, a failed verification results in a rejection of the request, with NGINX returning an HTTP forbidden status. Thus, bot_verifier_enable_repsheet not only simplifies bot management but also ensures that your web server's resources are not misused by illegitimate requests.

Config Example

location / {
    bot_verifier_enable_repsheet on;
    bot_verifier_redis_host localhost;
    bot_verifier_redis_port 6379;
    bot_verifier_redis_connection_timeout 10;
    bot_verifier_redis_read_timeout 10;
    bot_verifier_redis_expiry 3600;
}

Ensure the Redis server is running and accessible, as the directive relies on it for verification.

Using invalid or misconfigured Redis connection parameters may lead to errors in the bot verification process.

Enable the directive only in contexts where bot verification is needed to avoid unnecessary processing overhead.

← Back to all directives