bot_verifier_redis_port
The `bot_verifier_redis_port` directive sets the port for the Redis server used by the NGINX bot verification module.
Description
The bot_verifier_redis_port directive configures the port number to connect to a Redis cache server, which is essential for storing the verification status of search engine bots. By default, this port is expected to be the standard Redis port 6379, but it can be set to any valid Redis port to suit your server configuration. The Redis connection is used to check whether incoming requests are from verified bots, which helps in managing traffic to your site while ensuring that legitimate search engine crawlers are not blocked.
When using this directive, it's important to ensure that your NGINX configuration includes the bot_verifier directive set to on. This enables the bot verification checks at the designated access phase in the request processing lifecycle. The module utilizes the specified Redis host and port to look up the verification status of incoming requests based on their IP addresses. If an incoming request's verification status matches an entry in Redis, requests can be allowed or blocked accordingly. Misconfiguration can lead to failures in connecting to Redis, resulting in blocked legitimate traffic, so ensuring proper connection settings is paramount.
Config Example
location / {
bot_verifier 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;
bot_verifier_repsheet_enabled on;
}Ensure that the specified Redis server is reachable; otherwise, NGINX may block all requests to your site.
If Redis is running on a custom port, make sure to modify this directive accordingly to avoid connection issues.
Avoid using ports below 1024 unless you are sure about the implications and permissions needed for those ports.