HTTP Headers Reference

97+ HTTP headers organized by category. Search by name or description. Click to copy the header name or an example value.

Showing 97 of 97 headers

AcceptRequest

Informs the server about the content types the client can process.

ExampleAccept: text/html, application/xhtml+xml, */*
Accept-CharsetRequestDEPRECATED

Advertises which character encodings the client understands. Mostly obsolete.

ExampleAccept-Charset: utf-8, iso-8859-1;q=0.5
Accept-EncodingRequest

Indicates which content-encoding algorithms (compression) the client supports.

ExampleAccept-Encoding: gzip, deflate, br
Accept-LanguageRequest

Tells the server the preferred natural language for the response.

ExampleAccept-Language: en-US, en;q=0.9, fr;q=0.8
AuthorizationRequest

Carries credentials to authenticate the client with the server.

ExampleAuthorization: Bearer eyJhbGciOiJIUzI1NiIs...
ConnectionRequest

Controls whether the network connection stays open after the current transaction.

ExampleConnection: keep-alive
Content-LengthRequest

Indicates the size (in bytes) of the request body sent to the server.

ExampleContent-Length: 348
Content-TypeRequest

Describes the media type of the body of the request (when sending data).

ExampleContent-Type: application/json; charset=utf-8
CookieRequest

Sends previously stored cookies from the client back to the server.

ExampleCookie: session=abc123; theme=dark
DNTRequest

Do Not Track — signals the user's tracking preference. Not widely honoured.

ExampleDNT: 1
ExpectRequest

Indicates that the client requires certain server behaviours to proceed.

ExampleExpect: 100-continue
FromRequest

Contains the email address of the human user controlling the requesting user agent.

ExampleFrom: webmaster@example.com
HostRequest

Specifies the host and port number of the server to which the request is sent. Required in HTTP/1.1.

ExampleHost: www.example.com
If-MatchRequest

Makes the request conditional — server processes it only if the ETag matches.

ExampleIf-Match: "737060cd8c284d8af7ad3082f209582d"
If-Modified-SinceRequest

Makes the request conditional — returns 304 if the content has not changed since the given date.

ExampleIf-Modified-Since: Wed, 21 Oct 2015 07:28:00 GMT
If-None-MatchRequest

Returns 304 Not Modified if the ETag matches (used for cache validation).

ExampleIf-None-Match: "737060cd8c284d8af7ad3082f209582d"
If-RangeRequest

When resuming a partial download, requests the full resource if the ETag/date does not match.

ExampleIf-Range: Wed, 21 Oct 2015 07:28:00 GMT
If-Unmodified-SinceRequest

Succeeds only if the resource has not been modified since the specified date.

ExampleIf-Unmodified-Since: Wed, 21 Oct 2015 07:28:00 GMT
Max-ForwardsRequest

Limits the number of times a TRACE or OPTIONS request can be forwarded.

ExampleMax-Forwards: 10
OriginRequest

Identifies the origin (scheme, hostname, port) of the cross-site access request.

ExampleOrigin: https://developer.mozilla.org
Proxy-AuthorizationRequest

Contains the credentials to authenticate a user agent with a proxy server.

ExampleProxy-Authorization: Basic dGlwOjkwOTAw
RangeRequest

Requests only a specific portion of a file — used for resumable downloads.

ExampleRange: bytes=200-1023
RefererRequest

Contains the URL of the page that linked to the resource being requested.

ExampleReferer: https://developer.example.com/page
TERequest

Specifies the transfer encodings the user agent is willing to accept.

ExampleTE: trailers, deflate
Upgrade-Insecure-RequestsRequest

Signals the client's preference to receive an encrypted and authenticated response.

ExampleUpgrade-Insecure-Requests: 1
User-AgentRequest

Identifies the client software, operating system, and version making the request.

ExampleUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
ViaRequest

Informs about proxies through which the request was sent.

ExampleVia: 1.1 vegur
Accept-RangesResponse

Indicates if the server supports partial resource requests (byte-range requests).

ExampleAccept-Ranges: bytes
AgeResponse

How many seconds the object has been stored in a proxy cache.

ExampleAge: 24
AllowResponse

Lists the HTTP methods supported by the resource. Sent with a 405 response.

ExampleAllow: GET, POST, HEAD
Content-DispositionResponse

Indicates if content should be displayed inline or treated as a download attachment.

ExampleContent-Disposition: attachment; filename="report.pdf"
Content-EncodingResponse

Specifies the compression encoding applied to the response body.

ExampleContent-Encoding: gzip
Content-LanguageResponse

Describes the natural language(s) of the intended audience for the response.

ExampleContent-Language: en-US
Content-LengthResponse

Indicates the size in bytes of the response body.

ExampleContent-Length: 26012
Content-LocationResponse

Indicates an alternate location for the returned data.

ExampleContent-Location: /documents/foo.json
Content-RangeResponse

Indicates where a partial message belongs in the full resource body.

ExampleContent-Range: bytes 200-1000/67589
Content-TypeResponse

Describes the media type of the response body.

ExampleContent-Type: text/html; charset=utf-8
DateResponse

The date and time at which the message was generated on the server.

ExampleDate: Wed, 21 Oct 2015 07:28:00 GMT
ETagResponse

A unique identifier for a specific version of a resource, used for cache validation.

ExampleETag: "737060cd8c284d8af7ad3082f209582d"
ExpiresResponse

Gives a date/time after which the response is considered stale (superseded by Cache-Control).

ExampleExpires: Thu, 01 Dec 1994 16:00:00 GMT
Last-ModifiedResponse

The date and time at which the resource was last modified on the server.

ExampleLast-Modified: Tue, 15 Nov 1994 12:45:26 GMT
LinkResponse

Serialises one or more links in HTTP headers. Equivalent to the HTML <link> element.

ExampleLink: <https://example.com>; rel="preload"; as="font"
LocationResponse

Indicates the URL to redirect to in a 3xx redirect or after 201 Created.

ExampleLocation: https://www.example.com/new-page
Retry-AfterResponse

Tells the client how long to wait before making a follow-up request (rate-limit / maintenance).

ExampleRetry-After: 120
ServerResponse

Describes the software used by the origin server to handle the request.

ExampleServer: nginx/1.25.3
Set-CookieResponse

Sends a cookie from the server to the user agent for storage.

ExampleSet-Cookie: id=a3fWa; Expires=Thu, 21 Oct 2021 07:28:00 GMT; Secure; HttpOnly
TrailerResponse

Allows the sender to include additional fields at the end of a chunked message.

ExampleTrailer: Expires
Transfer-EncodingResponse

Specifies the form of encoding used to transfer the payload body.

ExampleTransfer-Encoding: chunked
VaryResponse

Determines how to match request headers to decide whether a cached response can be used.

ExampleVary: Accept-Encoding, Accept-Language
WWW-AuthenticateResponse

Defines the HTTP authentication method that should be used to gain access to a resource.

ExampleWWW-Authenticate: Basic realm="Access to the staging site"
Content-Security-PolicySecurity

Restricts the sources from which the browser can load resources (scripts, styles, images, etc.).

ExampleContent-Security-Policy: default-src 'self'; script-src 'self' cdn.example.com
Content-Security-Policy-Report-OnlySecurity

Like CSP but only reports violations without enforcing them. Useful for testing a new policy.

ExampleContent-Security-Policy-Report-Only: default-src 'self'; report-uri /csp-report
Strict-Transport-SecuritySecurity

Forces browsers to only use HTTPS for a specified time period (HSTS).

ExampleStrict-Transport-Security: max-age=63072000; includeSubDomains; preload
X-Content-Type-OptionsSecurity

Prevents browsers from MIME-sniffing the content type away from the declared value.

ExampleX-Content-Type-Options: nosniff
X-Frame-OptionsSecurityDEPRECATED

Indicates whether a page can be embedded in an <iframe>. Prevents clickjacking attacks.

ExampleX-Frame-Options: DENY
X-XSS-ProtectionSecurityDEPRECATED

Configures the cross-site scripting (XSS) filter built into older browsers. Deprecated in favour of CSP.

ExampleX-XSS-Protection: 1; mode=block
Referrer-PolicySecurity

Controls how much referrer information is included with requests.

ExampleReferrer-Policy: strict-origin-when-cross-origin
Permissions-PolicySecurity

Allows or denies the use of browser features (camera, geolocation, microphone, etc.).

ExamplePermissions-Policy: geolocation=(), microphone=(), camera=()
Cross-Origin-Embedder-PolicySecurity

Prevents a document from loading cross-origin resources that do not explicitly grant permission.

ExampleCross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-PolicySecurity

Ensures a top-level document does not share a browsing context group with cross-origin documents.

ExampleCross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-PolicySecurity

Conveys a desire that the browser blocks no-cors cross-origin/cross-site requests to the resource.

ExampleCross-Origin-Resource-Policy: same-origin
Expect-CTSecurityDEPRECATED

Lets sites opt in to reporting and enforcement of Certificate Transparency requirements. Deprecated.

ExampleExpect-CT: max-age=86400, enforce
Public-Key-PinsSecurityDEPRECATED

Associates a cryptographic public key with a web server to reduce the risk of MITM attacks. Deprecated.

ExamplePublic-Key-Pins: pin-sha256="base64=="; max-age=2592000; includeSubDomains
Access-Control-Allow-OriginCORS

Indicates whether the response can be shared with requesting code from the given origin.

ExampleAccess-Control-Allow-Origin: *
Access-Control-Allow-CredentialsCORS

Indicates whether the response to the request can be exposed when the credentials flag is true.

ExampleAccess-Control-Allow-Credentials: true
Access-Control-Allow-HeadersCORS

Used in preflight responses to indicate which request headers can be used during the actual request.

ExampleAccess-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With
Access-Control-Allow-MethodsCORS

Specifies the HTTP methods allowed when accessing the resource in a CORS context.

ExampleAccess-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Expose-HeadersCORS

Indicates which headers can be exposed as part of the response by listing their names.

ExampleAccess-Control-Expose-Headers: Content-Length, X-Request-Id
Access-Control-Max-AgeCORS

Indicates how long the results of a preflight request can be cached (in seconds).

ExampleAccess-Control-Max-Age: 86400
Access-Control-Request-HeadersCORS

Used in preflight requests to tell the server which headers will be used in the actual request.

ExampleAccess-Control-Request-Headers: Content-Type, Authorization
Access-Control-Request-MethodCORS

Used in preflight requests to let the server know which HTTP method will be used in the actual request.

ExampleAccess-Control-Request-Method: POST
Cache-ControlCaching

Directives for caching mechanisms in both requests and responses.

ExampleCache-Control: max-age=3600, must-revalidate
PragmaCachingDEPRECATED

Implementation-specific request header that may have various effects along the chain. Mostly obsolete.

ExamplePragma: no-cache
Clear-Site-DataCaching

Clears browsing data (cookies, storage, cache) associated with the requesting origin.

ExampleClear-Site-Data: "cache", "cookies", "storage"
ETagCaching

A version identifier for a specific version of a resource, enabling cache validation.

ExampleETag: "33a64df551425fcc55e"
ExpiresCachingDEPRECATED

Contains the date/time after which the response is stale. Superseded by Cache-Control max-age.

ExampleExpires: Thu, 01 Dec 1994 16:00:00 GMT
Last-ModifiedCaching

The last modification date of the resource. Used for cache validation alongside If-Modified-Since.

ExampleLast-Modified: Mon, 06 Mar 2023 12:00:00 GMT
VaryCaching

Tells caches which request headers to use to determine if a cached response is still fresh.

ExampleVary: Accept-Encoding
Content-EncodingContent

Lists the encodings that have been applied to the entity body (e.g. compression).

ExampleContent-Encoding: br
Content-LanguageContent

Describes the natural language(s) intended for the audience of the enclosed content.

ExampleContent-Language: de-DE, en-CA
Content-LengthContent

The size of the resource, in decimal number of bytes.

ExampleContent-Length: 3495
Content-LocationContent

Indicates an alternate location for the returned data.

ExampleContent-Location: /documents/foo.json
Content-RangeContent

Indicates where in the full body message a partial message belongs.

ExampleContent-Range: bytes 200-999/1234
Content-TypeContent

Indicates the media type of the resource or data in the body of the message.

ExampleContent-Type: multipart/form-data; boundary=something
Transfer-EncodingContent

Specifies the form of encoding used to safely transfer the payload to the user.

ExampleTransfer-Encoding: chunked
Accept-PatchContent

Advertises which media types the server can accept in a PATCH request.

ExampleAccept-Patch: application/json-patch+json
Accept-PostContent

Advertises which media types the server can accept in a POST request.

ExampleAccept-Post: application/json, application/x-www-form-urlencoded
AuthorizationAuthentication

Sends credentials (token, basic auth) to the server for the current request.

ExampleAuthorization: Basic dXNlcjpwYXNzd29yZA==
WWW-AuthenticateAuthentication

Defines the authentication scheme and parameters for the resource.

ExampleWWW-Authenticate: Bearer realm="example", charset="UTF-8"
Proxy-AuthenticateAuthentication

Defines the authentication method that should be used to gain access through a proxy.

ExampleProxy-Authenticate: Basic realm="Access to internal site"
Proxy-AuthorizationAuthentication

Contains the credentials to authenticate a user agent with a proxy server.

ExampleProxy-Authorization: Basic dGlwOjkwOTAw
UpgradeWebSocket

Requests the server to switch to a different protocol (e.g. HTTP → WebSocket).

ExampleUpgrade: websocket
Sec-WebSocket-AcceptWebSocket

Sent by the server to confirm it is willing to upgrade the connection to WebSocket.

ExampleSec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
Sec-WebSocket-ExtensionsWebSocket

Negotiates protocol extensions between client and server during the WebSocket handshake.

ExampleSec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-KeyWebSocket

A base64-encoded nonce sent by the client to prevent cached responses and confirm handshake.

ExampleSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-ProtocolWebSocket

Specifies one or more subprotocols to use over the WebSocket connection.

ExampleSec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-VersionWebSocket

Specifies the WebSocket protocol version the client wants to use.

ExampleSec-WebSocket-Version: 13