---
title: client.bot.name
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/variables/client-request/client-bot-name
---

**Type:** STRING  
**Access:** read-only

**Available in:** all subroutines

Where the client is identifying itself as a known bot, this variable is set to the name of the bot (e.g., "Googlebot") claiming to be making the request.

The `User-Agent` header, which is used to infer the name of the bot, may be set arbitrarily in the request headers from a client.  Some bots may therefore choose to send a `User-Agent` header that identifies them as a different, better known bot in order to evade or intentionally trigger logic that is intended to apply to that kind of bot.  In setting the value of `client.bot.name`, Fastly makes no attempt to verify the claims being made by the requesting client.

However, it is possible to use other aspects about a HTTP request - in particular the network from which the client IP is allocated, in order to better verify the authenticity of a bot's identity.  For example, a client legitimately claiming to be Googlebot will only ever make requests [from Google's network](https://support.google.com/webmasters/answer/80553?hl=en), and you could write VCL code to validate this:

```vcl
if (client.bot.name == "Googlebot" && client.as.name == "google llc") {
  # The client *claims* to be Googlebot and the client IP belongs to Google
  ...
}
```

Fastly provides [Geolocation data for IPs](https://www.fastly.com/documentation/reference/vcl/variables/geolocation/), including which [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) an IP is registered to. You can use this in conjunction with the `client.bot.name` variable to confirm that the IP is in fact one of the IP ranges registered to Google:
