Host

The host and optional port of the target server. Required in HTTP/1.1 for virtual hosting.

Request

Syntax

Host: <host>[:<port>]

Example values

ValueExplanation
api.example.comHostname
localhost:3000With port

cURL usage

curl https://api.example.com  # Host set automatically

Common mistakes

Sending wrong Host for virtual hosts; missing in HTTP/1.0.

Related headers

Tools

HTTP Header Viewer →