You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!
Host request header specifies the domain name of the server (for virtual hosting), and (optionally) the TCP port number on which the server is listening.
If no port is given, the default port for the service requested (e.g., "80" for an HTTP URL) is implied.
Host header field must be sent in all HTTP/1.1 request messages. A
400 (Bad Request) status code will be sent to any HTTP/1.1 request message that lacks a
Host header field or contains more than one.
|Header type||Request header|
|Forbidden header name||yes|
- the domain name of the server (for virtual hosting).
- <port> Optional
- TCP port number on which the server is listening.
|RFC 7230, section 5.4: Host||Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing|
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
|Chrome Full support Yes||Edge Full support Yes||Firefox Full support Yes||IE Full support Yes||Opera Full support Yes||Safari Full support Yes||WebView Android Full support Yes||Chrome Android Full support Yes||Firefox Android Full support Yes||Opera Android Full support Yes||Safari iOS Full support Yes||Samsung Internet Android Full support Yes|
- Full support
- Full support