bot_verifier_redis_host

Sets the Redis host for the bot verification module in NGINX.

Syntaxbot_verifier_redis_host ;
Defaultlocalhost
Contexthttp, server, location
Arguments1

Description

The bot_verifier_redis_host directive is used to specify the hostname or IP address of the Redis server that the bot verification module will connect to for caching the verification status of bots. This is crucial as the module relies on cached data for efficient bot verification and reducing validation latency.

This directive can be placed within the http, server, or location context, allowing for flexibility in configuration based on server architecture or individual location requirements. If the Redis server is hosted remotely or under a different domain, you would replace the default value of 'localhost' with the appropriate hostname or IP address.

When an incoming request is processed, the bot verification module will attempt to connect to the specified Redis server to check whether the request is from a known search bot. If the cache connection cannot be established due to misconfiguration or unavailability of the Redis server, the module may decline the request or block it by default, leading to potential accessibility issues for legitimate search bot operations.

Config Example

location / {
    bot_verifier on;
    bot_verifier_redis_host redis.example.com;
    bot_verifier_redis_port 6379;
}

Ensure the Redis server is reachable from the NGINX server.

Mismatched Redis configuration may lead to failed requests.

Failure to set this directive may cause verification to fallback to default behaviors, possibly blocking valid search engine bots.

← Back to all directives