Via: the proxies a message passed through
Via records each proxy and gateway a message passed through, in order, so you can see the path a request or response actually took.
At a glance
- Direction
- Both. Every intermediary appends itself to whatever is already there.
- Defined in
- RFC 9110
- When absent
- Either no intermediary handled the message, or one of them chose not to identify itself.
- Entry format
- An optional protocol, the version, then a host name or pseudonym: 1.1 edge-lhr
- Order
- Oldest first, so the entry closest to the origin is at the end of the list.
- Loop detection
- A proxy seeing its own name already present knows the message is circling.
- Privacy
- Pseudonyms are allowed, so an internal host name need not be exposed.
In detail
Each intermediary appends one entry naming the protocol version it received on and either its host name or a pseudonym. Reading the list from left to right walks the path in order, so a response with three entries went through three hops, and the last one is the closest to the origin server.
The loop detection use is the reason the header is required rather than optional for a proxy. If a proxy finds its own name already in the list, the message has come back to it, which means a routing misconfiguration somewhere ahead. Without that check a misconfigured pair of proxies can bounce a request between them indefinitely.
When debugging a cache it answers the first question, which is whether an intermediary was involved at all. A response arriving with a Via entry you did not expect usually means a corporate proxy or a transparent cache on the path, and that is often the explanation for content nobody can reproduce from outside that network.
Pseudonyms exist so that recording the path does not require publishing your internal topology. A gateway can call itself something meaningful to your operations team and opaque to everyone else, which keeps the loop detection working without listing real host names on the public internet.
It also has a request side that is easy to forget. The header travels in both directions, so a request arriving at your origin with entries already in it went through intermediaries before it reached you, and that is worth logging next to the forwarded address headers. Together they answer whether a strange request came through your own edge or around it.
Examples
HTTP/1.1 200 OK
Via: 1.1 edge-lhr, 1.1 cache-02
Age: 43Read left to right for the path. The Age line says a cache on that path served this from storage.
Via: HTTP/1.1 gateway.internal.exampleThings that catch people out
- Not every proxy appends an entry, so an absent Via is weak evidence that nothing was in the path.
- Entries can be added by intermediaries you do not control, which means the list is informational rather than trustworthy.
- Do not confuse it with X-Forwarded-For. This header records the proxies; that one records the client addresses.
Try it: HTTP Headers Checker
Check a live URL or paste headers you already have. It grades six security headers from A+ to F and lists every other header the response returned.
HTTP Headers Checker
LOCAL · Browser-OnlyView HTTP response headers for any URL
Enter any website URL to fetch and analyze its HTTP response headers. We'll automatically add https:// if needed.
Why Check Security Headers?
Security headers protect your website against common attacks like XSS, clickjacking, and MIME sniffing. They're set by your web server and cost nothing to implement. Missing security headers are one of the most common findings in security audits.
Related HTTP headers
All http headers →Forwarded: the standardised proxy header
The syntax of the standard Forwarded header, how it replaces the X-Forwarded set, how to quote IPv6 addresses and ports, and how far to trust it.
X-Forwarded-For: the client address behind a proxy
How the X-Forwarded-For list is built, why the leftmost address is not trustworthy, how to count trusted hops, and what breaks rate limiting behind a proxy.
Server: what software answered the request
What the Server header conveys, why exposing a version number helps attackers narrow their targets, and what to put there instead of removing it entirely.
Age: how long a cached response has been sitting there
What the Age header counts, how it combines with max-age to give remaining freshness, and how to use it to tell a cache hit from a miss at the edge.
X-Forwarded-Proto: the scheme the client actually used
Why an application behind a proxy cannot see the client scheme, how X-Forwarded-Proto restores it, and the redirect loop that follows from ignoring it.
Connection: keep-alive, close and hop by hop headers
What the Connection header controls, how it lists hop by hop headers, why HTTP/1.1 keeps connections open by default, and why HTTP/2 forbids it.
Tools for this
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL
- HTTP Request Builder Free online HTTP request builder - build and test HTTP requests with custom headers and body