Skip to main content

Request Header

Host

: api.example.com:443

Specifies the target host and port of the resource being requested.

DirectionRequest Header
StatusStandardized
Seen with400, 421
Updated2026-07-10

What is the Host header?

The Host request header names the domain (and optional port) of the server the request targets. It is mandatory in HTTP/1.1: every request must include exactly one Host header so the server knows which host the client intends to reach.

API Usage & Best Practices

  • Enables virtual hosting: Multiple domains can share one IP address because Host disambiguates which site or API the request is for.
  • Missing or duplicate values fail: An HTTP/1.1 request without a Host, or with more than one, must be answered with 400 Bad Request.
  • Ties to 421: If a server receives a request for a host it cannot serve on that connection, it may respond with 421 Misdirected Request.

Examples

GET /v1/users HTTP/1.1
Host: api.example.com:443
2