Cf-Ray

Every request passing through the Cloudflare network receives a unique identifier. The Cf-Ray response header is an unofficial, Cloudflare-specific header carrying this identifier for request tracing and debugging.

Usage

The Cf-Ray header is added by Cloudflare to every HTTP response passing through its network. The value is an opaque request identifier ending in a code naming the data center handling the request. Servers behind Cloudflare also receive this header as a request header, making end-to-end request tracing possible.

Adding the Cf-Ray value to origin server logs helps match proxied requests to entries in server-side logs. In NGINX, the value is accessible through the $http_cf_ray variable. Full request data, including ingress data center details, is available through Cloudflare Logs, with current access requirements in the Cloudflare dashboard.

Directives

ray-id

The ray-id is a hashed value uniquely identifying the request. While each request receives a ray ID, uniqueness is not strictly guaranteed across all requests.

datacenter-code

The datacenter-code is a three-letter IATA airport code identifying the Cloudflare data center processing the request. For example, LAX represents the Los Angeles data center and SJC represents San Jose.

The visitor-facing response header names the ingress data center. The request header the origin receives is generated closer to the origin connection, so the two codes differ on routed paths such as Argo Smart Routing or Tiered Cache.

Example

The value is split into two parts separated by a hyphen. The first part is the ray ID, a unique hash for the request. The second part is an IATA airport code identifying the Cloudflare data center. In this case, SJC refers to the San Jose, California data center.

Cf-Ray: 9ab9830f8f01234f-SJC

The same website requested from a different geographic location routes through a different data center. Here EWR refers to the Newark, New Jersey data center.

Cf-Ray: 9b7d22ba0cdcde9c-EWR

When troubleshooting, the ray ID is the value to provide to Cloudflare support or to search for in log files. The data center code helps confirm which edge location handled the request.

See also

Last updated: September 21, 2026