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

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

**Available in:** all subroutines

Request ID that is generated by each cache server.

If you have shielding or clustering enabled, the value will change as the
request moves from one Fastly server to another.

In most cases, set a request header using a UUID instead. For example:

```vcl
if (!req.http.Request-ID) {
  set req.http.Request-ID = uuid.version4();
}
```
