Name

Host: hostname: port

Synopsis

The hostname and optional port number of the server contacted by the client. If the port number is 80, the colon and port number should be omitted. For example:

Host: www.ora.com

Or for a port number other than 80 (in this example, 7777):

Host: www.ora.com:7777

This is useful to indicate what server the client thinks it is talking to. It allows multihomed servers to use the same IP address with different DNS names. Clients must supply this information in HTTP 1.1, so servers with multiple hostnames can easily differentiate between ambiguous URLs.

Get HTTP Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.