Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTTP
  3. Reference
  4. Headers
  5. Host

Host header

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

The HTTPHostrequest 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 is implied (e.g.,443 for an HTTPS URL, and80 for an HTTP URL).

AHost header field must be sent in all HTTP/1.1 request messages.A400 Bad Request status code may be sent to any HTTP/1.1 request message that lacks or contains more than oneHost header field.

Header typeRequest header
Forbidden request headerYes

Syntax

http
Host: <host>:<port>

Directives

<host>

The domain name of the server (for virtual hosting).

<port>Optional

TCP port number on which the server is listening.

Examples

http
Host: developer.mozilla.org

Specifications

Specification
HTTP Semantics
# field.host

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp