Host header

The request header that names the server and port the request is for, such as Host: localhost:8765.

In more detail

It is required in HTTP/1.1 because one address can serve many sites, and the server needs to know which one you meant. Proxies and gateways use it to route requests to the right site or service.

Example

A reverse proxy or web server uses it to pick the right site or origin. A wrong Host header is a common reason a request reaches the right machine but gets the wrong site.

Related terms

Taught in

References

Certification courses