The Host request header specifies the host and port number of the server to which the request is being sent.

If no port is included, the default port for the service requested (e.g., 443 for an HTTPS URL, and 80 for an HTTP URL) is implied.

A Host header field must be sent in all HTTP/1.1 request messages. A 400 (Bad Request) status code may be sent to any HTTP/1.1 request message that lacks a Host header field or that contains more than one.


Host: <host>:<port>


the domain name of the server (for virtual hosting).
<port> Optional
TCP port number on which the server is listening.


Host: developer.cdn.mozilla.net


Specification Title
RFC 7230, section 5.4: Host Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing

Browser compatibilityUpdate compatibility data on GitHub

Chrome Edge Firefox Internet Explorer Opera Safari
Host Yes 12 Yes Yes Yes Yes
Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
Host Yes Yes Yes Yes Yes Yes

See also

© 2005–2020 Mozilla and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.