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
AcceptRequestInforms the server about the content types the client can process.
Accept: text/html, application/xhtml+xml, */*Accept-CharsetRequestDEPRECATEDAdvertises which character encodings the client understands. Mostly obsolete.
Accept-Charset: utf-8, iso-8859-1;q=0.5Accept-EncodingRequestIndicates which content-encoding algorithms (compression) the client supports.
Accept-Encoding: gzip, deflate, brAccept-LanguageRequestTells the server the preferred natural language for the response.
Accept-Language: en-US, en;q=0.9, fr;q=0.8AuthorizationRequestCarries credentials to authenticate the client with the server.
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...ConnectionRequestControls whether the network connection stays open after the current transaction.
Connection: keep-aliveContent-LengthRequestIndicates the size (in bytes) of the request body sent to the server.
Content-Length: 348Content-TypeRequestDescribes the media type of the body of the request (when sending data).
Content-Type: application/json; charset=utf-8CookieRequestSends previously stored cookies from the client back to the server.
Cookie: session=abc123; theme=darkDNTRequestDo Not Track — signals the user's tracking preference. Not widely honoured.
DNT: 1ExpectRequestIndicates that the client requires certain server behaviours to proceed.
Expect: 100-continueFromRequestContains the email address of the human user controlling the requesting user agent.
From: webmaster@example.comHostRequestSpecifies the host and port number of the server to which the request is sent. Required in HTTP/1.1.
Host: www.example.comIf-MatchRequestMakes the request conditional — server processes it only if the ETag matches.
If-Match: "737060cd8c284d8af7ad3082f209582d"If-Modified-SinceRequestMakes the request conditional — returns 304 if the content has not changed since the given date.
If-Modified-Since: Wed, 21 Oct 2015 07:28:00 GMTIf-None-MatchRequestReturns 304 Not Modified if the ETag matches (used for cache validation).
If-None-Match: "737060cd8c284d8af7ad3082f209582d"If-RangeRequestWhen resuming a partial download, requests the full resource if the ETag/date does not match.
If-Range: Wed, 21 Oct 2015 07:28:00 GMTIf-Unmodified-SinceRequestSucceeds only if the resource has not been modified since the specified date.
If-Unmodified-Since: Wed, 21 Oct 2015 07:28:00 GMTMax-ForwardsRequestLimits the number of times a TRACE or OPTIONS request can be forwarded.
Max-Forwards: 10OriginRequestIdentifies the origin (scheme, hostname, port) of the cross-site access request.
Origin: https://developer.mozilla.orgProxy-AuthorizationRequestContains the credentials to authenticate a user agent with a proxy server.
Proxy-Authorization: Basic dGlwOjkwOTAwRangeRequestRequests only a specific portion of a file — used for resumable downloads.
Range: bytes=200-1023RefererRequestContains the URL of the page that linked to the resource being requested.
Referer: https://developer.example.com/pageTERequestSpecifies the transfer encodings the user agent is willing to accept.
TE: trailers, deflateUpgrade-Insecure-RequestsRequestSignals the client's preference to receive an encrypted and authenticated response.
Upgrade-Insecure-Requests: 1User-AgentRequestIdentifies the client software, operating system, and version making the request.
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)ViaRequestInforms about proxies through which the request was sent.
Via: 1.1 vegurAccept-RangesResponseIndicates if the server supports partial resource requests (byte-range requests).
Accept-Ranges: bytesAgeResponseHow many seconds the object has been stored in a proxy cache.
Age: 24AllowResponseLists the HTTP methods supported by the resource. Sent with a 405 response.
Allow: GET, POST, HEADContent-DispositionResponseIndicates if content should be displayed inline or treated as a download attachment.
Content-Disposition: attachment; filename="report.pdf"Content-EncodingResponseSpecifies the compression encoding applied to the response body.
Content-Encoding: gzipContent-LanguageResponseDescribes the natural language(s) of the intended audience for the response.
Content-Language: en-USContent-LengthResponseIndicates the size in bytes of the response body.
Content-Length: 26012Content-LocationResponseIndicates an alternate location for the returned data.
Content-Location: /documents/foo.jsonContent-RangeResponseIndicates where a partial message belongs in the full resource body.
Content-Range: bytes 200-1000/67589Content-TypeResponseDescribes the media type of the response body.
Content-Type: text/html; charset=utf-8DateResponseThe date and time at which the message was generated on the server.
Date: Wed, 21 Oct 2015 07:28:00 GMTETagResponseA unique identifier for a specific version of a resource, used for cache validation.
ETag: "737060cd8c284d8af7ad3082f209582d"ExpiresResponseGives a date/time after which the response is considered stale (superseded by Cache-Control).
Expires: Thu, 01 Dec 1994 16:00:00 GMTLast-ModifiedResponseThe date and time at which the resource was last modified on the server.
Last-Modified: Tue, 15 Nov 1994 12:45:26 GMTLinkResponseSerialises one or more links in HTTP headers. Equivalent to the HTML <link> element.
Link: <https://example.com>; rel="preload"; as="font"LocationResponseIndicates the URL to redirect to in a 3xx redirect or after 201 Created.
Location: https://www.example.com/new-pageRetry-AfterResponseTells the client how long to wait before making a follow-up request (rate-limit / maintenance).
Retry-After: 120ServerResponseDescribes the software used by the origin server to handle the request.
Server: nginx/1.25.3Set-CookieResponseSends a cookie from the server to the user agent for storage.
Set-Cookie: id=a3fWa; Expires=Thu, 21 Oct 2021 07:28:00 GMT; Secure; HttpOnlyTrailerResponseAllows the sender to include additional fields at the end of a chunked message.
Trailer: ExpiresTransfer-EncodingResponseSpecifies the form of encoding used to transfer the payload body.
Transfer-Encoding: chunkedVaryResponseDetermines how to match request headers to decide whether a cached response can be used.
Vary: Accept-Encoding, Accept-LanguageWWW-AuthenticateResponseDefines the HTTP authentication method that should be used to gain access to a resource.
WWW-Authenticate: Basic realm="Access to the staging site"Content-Security-PolicySecurityRestricts the sources from which the browser can load resources (scripts, styles, images, etc.).
Content-Security-Policy: default-src 'self'; script-src 'self' cdn.example.comContent-Security-Policy-Report-OnlySecurityLike CSP but only reports violations without enforcing them. Useful for testing a new policy.
Content-Security-Policy-Report-Only: default-src 'self'; report-uri /csp-reportStrict-Transport-SecuritySecurityForces browsers to only use HTTPS for a specified time period (HSTS).
Strict-Transport-Security: max-age=63072000; includeSubDomains; preloadX-Content-Type-OptionsSecurityPrevents browsers from MIME-sniffing the content type away from the declared value.
X-Content-Type-Options: nosniffX-Frame-OptionsSecurityDEPRECATEDIndicates whether a page can be embedded in an <iframe>. Prevents clickjacking attacks.
X-Frame-Options: DENYX-XSS-ProtectionSecurityDEPRECATEDConfigures the cross-site scripting (XSS) filter built into older browsers. Deprecated in favour of CSP.
X-XSS-Protection: 1; mode=blockReferrer-PolicySecurityControls how much referrer information is included with requests.
Referrer-Policy: strict-origin-when-cross-originPermissions-PolicySecurityAllows or denies the use of browser features (camera, geolocation, microphone, etc.).
Permissions-Policy: geolocation=(), microphone=(), camera=()Cross-Origin-Embedder-PolicySecurityPrevents a document from loading cross-origin resources that do not explicitly grant permission.
Cross-Origin-Embedder-Policy: require-corpCross-Origin-Opener-PolicySecurityEnsures a top-level document does not share a browsing context group with cross-origin documents.
Cross-Origin-Opener-Policy: same-originCross-Origin-Resource-PolicySecurityConveys a desire that the browser blocks no-cors cross-origin/cross-site requests to the resource.
Cross-Origin-Resource-Policy: same-originExpect-CTSecurityDEPRECATEDLets sites opt in to reporting and enforcement of Certificate Transparency requirements. Deprecated.
Expect-CT: max-age=86400, enforcePublic-Key-PinsSecurityDEPRECATEDAssociates a cryptographic public key with a web server to reduce the risk of MITM attacks. Deprecated.
Public-Key-Pins: pin-sha256="base64=="; max-age=2592000; includeSubDomainsAccess-Control-Allow-OriginCORSIndicates whether the response can be shared with requesting code from the given origin.
Access-Control-Allow-Origin: *Access-Control-Allow-CredentialsCORSIndicates whether the response to the request can be exposed when the credentials flag is true.
Access-Control-Allow-Credentials: trueAccess-Control-Allow-HeadersCORSUsed in preflight responses to indicate which request headers can be used during the actual request.
Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-WithAccess-Control-Allow-MethodsCORSSpecifies the HTTP methods allowed when accessing the resource in a CORS context.
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONSAccess-Control-Expose-HeadersCORSIndicates which headers can be exposed as part of the response by listing their names.
Access-Control-Expose-Headers: Content-Length, X-Request-IdAccess-Control-Max-AgeCORSIndicates how long the results of a preflight request can be cached (in seconds).
Access-Control-Max-Age: 86400Access-Control-Request-HeadersCORSUsed in preflight requests to tell the server which headers will be used in the actual request.
Access-Control-Request-Headers: Content-Type, AuthorizationAccess-Control-Request-MethodCORSUsed in preflight requests to let the server know which HTTP method will be used in the actual request.
Access-Control-Request-Method: POSTCache-ControlCachingDirectives for caching mechanisms in both requests and responses.
Cache-Control: max-age=3600, must-revalidatePragmaCachingDEPRECATEDImplementation-specific request header that may have various effects along the chain. Mostly obsolete.
Pragma: no-cacheClear-Site-DataCachingClears browsing data (cookies, storage, cache) associated with the requesting origin.
Clear-Site-Data: "cache", "cookies", "storage"ETagCachingA version identifier for a specific version of a resource, enabling cache validation.
ETag: "33a64df551425fcc55e"ExpiresCachingDEPRECATEDContains the date/time after which the response is stale. Superseded by Cache-Control max-age.
Expires: Thu, 01 Dec 1994 16:00:00 GMTLast-ModifiedCachingThe last modification date of the resource. Used for cache validation alongside If-Modified-Since.
Last-Modified: Mon, 06 Mar 2023 12:00:00 GMTVaryCachingTells caches which request headers to use to determine if a cached response is still fresh.
Vary: Accept-EncodingContent-EncodingContentLists the encodings that have been applied to the entity body (e.g. compression).
Content-Encoding: brContent-LanguageContentDescribes the natural language(s) intended for the audience of the enclosed content.
Content-Language: de-DE, en-CAContent-LengthContentThe size of the resource, in decimal number of bytes.
Content-Length: 3495Content-LocationContentIndicates an alternate location for the returned data.
Content-Location: /documents/foo.jsonContent-RangeContentIndicates where in the full body message a partial message belongs.
Content-Range: bytes 200-999/1234Content-TypeContentIndicates the media type of the resource or data in the body of the message.
Content-Type: multipart/form-data; boundary=somethingTransfer-EncodingContentSpecifies the form of encoding used to safely transfer the payload to the user.
Transfer-Encoding: chunkedAccept-PatchContentAdvertises which media types the server can accept in a PATCH request.
Accept-Patch: application/json-patch+jsonAccept-PostContentAdvertises which media types the server can accept in a POST request.
Accept-Post: application/json, application/x-www-form-urlencodedAuthorizationAuthenticationSends credentials (token, basic auth) to the server for the current request.
Authorization: Basic dXNlcjpwYXNzd29yZA==WWW-AuthenticateAuthenticationDefines the authentication scheme and parameters for the resource.
WWW-Authenticate: Bearer realm="example", charset="UTF-8"Proxy-AuthenticateAuthenticationDefines the authentication method that should be used to gain access through a proxy.
Proxy-Authenticate: Basic realm="Access to internal site"Proxy-AuthorizationAuthenticationContains the credentials to authenticate a user agent with a proxy server.
Proxy-Authorization: Basic dGlwOjkwOTAwUpgradeWebSocketRequests the server to switch to a different protocol (e.g. HTTP → WebSocket).
Upgrade: websocketSec-WebSocket-AcceptWebSocketSent by the server to confirm it is willing to upgrade the connection to WebSocket.
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=Sec-WebSocket-ExtensionsWebSocketNegotiates protocol extensions between client and server during the WebSocket handshake.
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bitsSec-WebSocket-KeyWebSocketA base64-encoded nonce sent by the client to prevent cached responses and confirm handshake.
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==Sec-WebSocket-ProtocolWebSocketSpecifies one or more subprotocols to use over the WebSocket connection.
Sec-WebSocket-Protocol: chat, superchatSec-WebSocket-VersionWebSocketSpecifies the WebSocket protocol version the client wants to use.
Sec-WebSocket-Version: 13