HTTP - Host Header

1 - About

host in the context of HTTP is a header field that:

  • indicates the destination of the request
  • and is part of the origin definition

The Host field value is the network location of the origin server or gateway given by the original URL. The value is:

3 - Example

Example of a get request to the URLhttp://www.w3.org/pub/WWW/


GET /pub/WWW/ HTTP/1.1
Host: www.w3.org

4 - Usage

It's used:

4.1 - Network Route

This value is used (generally with TCP/IP) to route the message to the destination server.

4.2 - Gateway

It's also used to route the request to the destination website (A server may host several hostname called virtual host)

The http Server uses this value to create optionally virtual host.

On a Apache server for instance, the host value is mapped to the ServerName property of the configuration file in order to route the request to the backend web site.

5 - Set

The host is an header that is set by the client in a request. The client sets it from the value found in the URL.

6 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap