# Diagnostic response headers

Azion adds diagnostic headers to the responses it delivers. Two headers arrive on every response, and the request header `Pragma: azion-debug-cache` adds the location and cache headers. Under HTTP/2, the header names arrive in lowercase.

---

## Headers on every response

These headers arrive on every response, with or without debug headers:

| Header                  | What it carries                                                                                                                                                                                                  |
| :---------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x-azion-request-id`    | A unique identifier of the request. The Azion error page shows the same value as **Request ID**, and Real-Time Events stores it in the `requestId` field.                                                        |
| `x-azion-edge-location` | The code of the Azion data center that processed the request. The codes are published on the [Azion Status Page](https://status.azion.com/), and the Azion error page shows the same value as **Edge Location**. |

To find a request in the logs by its identifier, refer to [Gather information for Azion Support](/en/documentation/support/gather-information/#find-the-request-in-real-time-events).

---

## Debug headers

A request that carries `Pragma: azion-debug-cache` receives these headers in addition to the headers on every response. Without it, the response carries none of them.

| Header               | What it carries                                                                                                                         |
| :------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
| `x-azion-edge-pop`   | A location code, for debugging together with the cache headers. Its value can differ from `x-azion-edge-location` on the same response. |
| `x-cache`            | The cache status, the IP address of the server that answered the request, and the protocol                                              |
| `x-cache-key`        | The cache key the copy is stored under, which is the argument a cache key purge takes                                                   |
| `x-cache-file`       | The MD5 hash of the cache key                                                                                                           |
| `x-cache-since`      | The Unix timestamp of when the copy was stored                                                                                          |
| `x-cache-expire`     | The Unix timestamp of when the copy expires                                                                                             |
| `x-cache-expires-in` | The seconds left until the copy expires                                                                                                 |
| `x-cache-valid`      | The TTL configured for the copy, in seconds                                                                                             |
| `x-cache-config`     | The ID of the Azion configuration that served the request                                                                               |
| `x-cache-id`         | An identifier of the request, different on each response                                                                                |
| `x-cache-location`   | Returned with the other debug headers, for example `/`                                                                                  |

A `-` in place of the status in `x-cache` means no status: the content is restricted from caching. For every status value, such as `HIT` and `MISS`, refer to [Cache keys](/en/documentation/platform/applications/cache/cache-keys/).

Consecutive requests can reach different servers, and `x-cache` names the server that answered each one. To read the cache headers step by step, refer to [Check the cache status of a response](/en/documentation/guides/application-performance/cache-and-purge/check-page-cache-time/).

---

## Related resources

- [HTTP status codes](/en/documentation/fundamentals/http-status-codes.md): The fields of the Azion error page and the cause and fix of each error code.
- [Gather information for Azion Support](/en/documentation/support/gather-information.md): How to collect the request ID, the debug headers, and the rest of the evidence for a ticket.
- [Test the cache with the MCP server](/en/documentation/guides/application-performance/cache-and-purge/test-cache-with-mcp.md): Read the debug headers of several requests from an AI assistant.
- [Purge cached content](/en/documentation/guides/application-performance/cache-and-purge/purge-cached-content.md): Remove a stored copy before its TTL ends, by URL, wildcard, or cache key.
