X-Domain
When a reverse proxy serves many domains from shared infrastructure, the X-Domain unofficial response header reflects which domain name the server associated with the response.
Usage
The X-Domain header is set by reverse proxies, CDNs, and multi-tenant platforms to indicate which domain configuration produced the response. In environments where a single backend serves many domains, the header makes the matched domain explicit in the response, aiding debugging and log analysis.
A common scenario is a reverse proxy handling traffic for dozens of virtual hosts. When a request arrives, the proxy matches the request to a domain configuration, routes traffic to the appropriate backend, and echoes the matched domain in X-Domain. This confirms routing is working as expected, especially when multiple domain names map to the same IP or backend pool.
The header is closely related to X-Forwarded-Host,
which carries the original Host value through a proxy chain. Where
X-Forwarded-Host preserves the client's requested domain,
X-Domain reflects the domain the server resolved the request to,
which differs in alias or wildcard configurations.
Values
The value is nominally a domain name matching the
configuration generating the response. Observed values
run looser: alongside full domains, the bare subdomain
label www is the most common crawled value, so
deployments echo whatever fragment their configuration
stores rather than a guaranteed registrable domain.
Example
A response where the proxy has matched and echoed the primary domain serving the request.
X-Domain: example.re
A deployment echoing only the matched subdomain label rather than a full domain, the most common observed form.
X-Domain: www