What is the Via header in HTTP?
Definition
Via is a standard HTTP header to which each proxy or gateway appends the protocol version it received the message on and a name for itself.
For proxies it is not optional. RFC 9110 says “A proxy MUST send an appropriate Via header field” in each message it forwards, and gives three reasons: tracking forwards, avoiding request loops, and showing which protocol versions each hop supports. A proxy that leaves it out has been configured to, which is also why its absence tells you so little.
Reading an entry
Each member of the list is a received protocol, a name for the recipient, and an optional comment. The protocol name is dropped when it is HTTP, so 1.1 means HTTP/1.1. The name may be a real host and port or a pseudonym, and the specification lets an intermediary replace a sensitive host with one. A proxy acting as a portal through a firewall should not forward the names of hosts behind it unless it has been configured to. Every hop appends its own member, so the list reads in the order the message travelled: from the client outward on a request, from the origin outward on a response.
What real ones look like
We fetched these home pages with curl 8.7.1 on 21 October 2026 and kept the Via response header. The last row is from a local Squid 6.13 forwarding a request, seen by the server behind it.
| Where | Via value |
What it shows |
|---|---|---|
| www.python.org | 1.1 varnish, 1.1 varnish, 1.1 varnish |
Three cache layers on the response path, all using a pseudonym |
| developer.mozilla.org | 1.1 google, 1.1 varnish, 1.1 varnish, 1.1 varnish |
A layer that calls itself google, then three caches |
| www.bbc.co.uk | 1.1 BBC-GTM, 1.1 Belfrage, 1.1 varnish |
Two layers with their own names, then a cache |
| aws.amazon.com | 1.1 d833345b041d06a76c4a0e5211cc8a80.cloudfront.net (CloudFront) |
A CDN edge, with the comment naming the software |
| www.reddit.com | 1.1 varnish |
One cache |
| Local Squid, on the forwarded request | 1.1 squid-test (squid/6.13) |
Squid’s default: hostname plus version in the comment |
The python.org value could legally be shorter. RFC 9110 lets an intermediary collapse consecutive members that share a protocol version into one, its example turning 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy into 1.0 ricky, 1.1 mertz, 1.0 lucy, provided the hosts are under one organisation’s control and already pseudonymous. python.org’s three separate members show that its layers did not. Because combining is allowed, the number of members is only a lower bound on the layers that chose to announce themselves.
github.com, www.wikipedia.org and www.cloudflare.com sent no Via at all in the same run. That does not mean nothing sat in the path. It means whatever did was set not to say.
The command
curl -s -o /dev/null -D - https://www.python.org/ | grep -i '^via:'
To see the request side, send a request through the proxy to a server that echoes headers back. Pick the echo service carefully: through the same Squid, httpbin.org’s /headers showed no Via, because its front end strips it before the application sees the request. A local echo server, or one you control, shows what really arrived.
Turning it off
Squid adds the header on requests and replies by default; via off stops it. In our test, via off together with forwarded_for delete left the destination with neither Via nor X-Forwarded-For, which is what proxy lists call an elite proxy.
In a CONNECT tunnel the proxy has no request to annotate, so on HTTPS through a proxy the header cannot appear on the tunnelled traffic at all. The guide’s walk through what happens on the wire shows why the proxy sees so little there. What the client itself sends before any proxy adds anything is measured in what HTTP clients send before you configure anything.
Where it earns its keep: error pages
A Via on an error response tells you which hop wrote the error. Our Squid, denying a request for a blocked domain, answered:
HTTP/1.1 403 Forbidden
Server: squid/6.13
X-Squid-Error: ERR_ACCESS_DENIED 0
Via: 1.1 squid-test (squid/6.13)
That 403 came from the proxy, not the target, and the headers say so before you read a word of the body. The same question, asked with two requests instead of headers, is the first step in isolating proxy from target.