X-ContextId
The HTTP X-ContextId response header is an unofficial HTTP header sent by some web hosting platforms to expose an opaque identifier for the hosting context or account serving the request.
Note
The "X-" naming convention for HTTP headers, "X" referring to "experimental", has been deprecated and needs to be transitioned to the formal naming convention for HTTP headers.
Usage
Shared hosting environments route requests from many different accounts through common infrastructure. The X-ContextId header provides a short identifier associating a response with the specific hosting context (the account, site, or configuration slot) generating the response.
The value is an opaque alphanumeric string, often including a slash as a separator between components. The format is specific to each hosting platform and carries no standardized meaning across providers. External clients receive the header as part of the response, but the value is intended for internal platform diagnostics rather than consumption by browsers or API clients.
The header allows hosting platform engineers to correlate log entries with the specific account context when troubleshooting shared infrastructure issues. Its role is similar to X-Request-Id, though X-ContextId identifies the hosting context rather than a specific request.
Values
Opaque context identifier
The header value is a short alphanumeric string. Some platforms include a slash separating two components, where the first part identifies a region or cluster and the second part identifies the specific context within the region or cluster.
Example
A response from a shared hosting environment includes a context identifier consisting of alphanumeric characters separated by a slash. The first segment indicates a broader grouping and the second identifies the specific account or context slot.
X-ContextId: mLtZi0va/HaKz4Ve2
Different accounts on the same platform produce different identifiers. The format stays consistent while the values change with each account.
X-ContextId: jdlCbfFq/Jlddg2qM
Takeaway
The X-ContextId header identifies the hosting account or configuration context on shared hosting platforms. The value is opaque, platform-specific, and intended for internal diagnostic use rather than client-side processing.