HTTP Headers Reference
Searchable reference for HTTP request, response, and security headers with descriptions and example values.
50 headers
AcceptRequestMedia types the client can process.
Accept: application/json, text/htmlAccept-EncodingRequestCompression algorithms the client supports.
Accept-Encoding: gzip, deflate, brAccept-LanguageRequestPreferred natural languages for the response.
Accept-Language: en-US,en;q=0.9AuthorizationRequestCredentials to authenticate the client with the server.
Authorization: Bearer eyJhbGci...Cache-ControlBothDirectives for caching in both requests and responses.
Cache-Control: no-cache, no-storeConnectionBothControls whether the network connection stays open after the transaction.
Connection: keep-aliveContent-LengthBothSize of the request or response body in bytes.
Content-Length: 348Content-TypeBothMedia type of the resource or request body.
Content-Type: application/json; charset=utf-8CookieRequestStored HTTP cookies previously sent by the server.
Cookie: session=abc123; theme=darkHostRequestDomain name and port of the server being requested. Required in HTTP/1.1.
Host: api.example.comIf-Modified-SinceRequestMakes the request conditional — server returns 304 if not modified since this date.
If-Modified-Since: Wed, 21 Oct 2025 07:28:00 GMTIf-None-MatchRequestMakes the request conditional based on ETag. Returns 304 if ETag matches.
If-None-Match: "abc123"OriginRequestIndicates the origin of a cross-site request. Used in CORS.
Origin: https://app.example.comRefererRequestAddress of the previous page that linked to the current request.
Referer: https://example.com/pageUser-AgentRequestString identifying the client software making the request.
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)X-Forwarded-ForRequestIdentifies the originating IP address of a client behind a proxy or load balancer.
X-Forwarded-For: 203.0.113.195, 70.41.3.18X-Requested-WithRequestIdentifies Ajax requests. Commonly set to XMLHttpRequest by JS frameworks.
X-Requested-With: XMLHttpRequestRangeRequestRequests only part of a resource (used for resumable downloads).
Range: bytes=0-1023ExpectRequestIndicates expectations the server must meet to handle the request.
Expect: 100-continueForwardedRequestStandardized replacement for X-Forwarded-For with proxy information.
Forwarded: for=192.0.2.60;proto=http;by=203.0.113.43Access-Control-Allow-OriginResponseSpecifies which origins can access the resource in cross-origin requests (CORS).
Access-Control-Allow-Origin: https://app.example.comAccess-Control-Allow-MethodsResponseSpecifies HTTP methods allowed in CORS preflight responses.
Access-Control-Allow-Methods: GET, POST, PUT, DELETEAccess-Control-Allow-HeadersResponseSpecifies headers allowed in CORS requests.
Access-Control-Allow-Headers: Content-Type, AuthorizationAccess-Control-Max-AgeResponseHow long (seconds) the CORS preflight response can be cached.
Access-Control-Max-Age: 86400AgeResponseTime in seconds the object has been in a proxy cache.
Age: 24AllowResponseLists HTTP methods supported by the resource. Sent with 405 Method Not Allowed.
Allow: GET, POST, HEADContent-DispositionResponseIndicates if content should be displayed inline or downloaded as an attachment.
Content-Disposition: attachment; filename="report.pdf"Content-EncodingResponseEncoding applied to the response body (e.g., gzip).
Content-Encoding: gzipContent-LanguageResponseNatural language(s) of the response content.
Content-Language: en-USContent-RangeResponseIndicates the range of bytes returned in a partial content response.
Content-Range: bytes 0-1023/2048ETagResponseIdentifier for a specific version of a resource. Used for caching and conditional requests.
ETag: "abc123def456"ExpiresResponseDate/time after which the response is considered stale.
Expires: Thu, 01 Jan 2026 00:00:00 GMTLast-ModifiedResponseDate and time the resource was last modified.
Last-Modified: Wed, 21 Oct 2025 07:28:00 GMTLocationResponseURL to redirect the client to. Used with 3xx and 201 responses.
Location: https://example.com/new-pageRetry-AfterResponseHow long to wait before making a new request. Used with 429 and 503 responses.
Retry-After: 120ServerResponseInformation about the server software handling the request.
Server: nginx/1.25.3Set-CookieResponseSends a cookie from the server to the client.
Set-Cookie: session=abc123; HttpOnly; Secure; SameSite=StrictTransfer-EncodingResponseEncoding used to transfer the payload body (e.g., chunked).
Transfer-Encoding: chunkedVaryResponseTells caches which request headers to use when deciding whether a cached response can be used.
Vary: Accept-Encoding, Accept-LanguageWWW-AuthenticateResponseDefines the authentication method to access the resource. Sent with 401 responses.
WWW-Authenticate: Bearer realm="api"Content-Security-PolicySecurityControls which resources the browser is allowed to load. Primary XSS defense.
Content-Security-Policy: default-src 'self'; script-src 'self' 'nonce-abc'Strict-Transport-SecuritySecurityForces browsers to use HTTPS for future requests. Prevents protocol downgrade attacks.
Strict-Transport-Security: max-age=31536000; includeSubDomains; preloadX-Content-Type-OptionsSecurityPrevents browsers from MIME-sniffing a response away from the declared content type.
X-Content-Type-Options: nosniffX-Frame-OptionsSecurityControls whether the page can be embedded in an iframe. Prevents clickjacking. Superseded by CSP frame-ancestors.
X-Frame-Options: DENYX-XSS-ProtectionSecurityLegacy XSS filter for older browsers. Largely superseded by CSP.
X-XSS-Protection: 1; mode=blockReferrer-PolicySecurityControls how much referrer information is included with requests.
Referrer-Policy: strict-origin-when-cross-originPermissions-PolicySecurityControls which browser features and APIs can be used (replaces Feature-Policy).
Permissions-Policy: camera=(), microphone=(), geolocation=()Cross-Origin-Opener-PolicySecurityIsolates the browsing context to prevent cross-origin attacks (required for SharedArrayBuffer).
Cross-Origin-Opener-Policy: same-originCross-Origin-Embedder-PolicySecurityPrevents loading cross-origin resources without explicit permission.
Cross-Origin-Embedder-Policy: require-corpCross-Origin-Resource-PolicySecurityPrevents other origins from reading the response of the resource.
Cross-Origin-Resource-Policy: same-originWhat Is HTTP Headers Reference?
A searchable reference for all standard HTTP request, response, and security headers. Each entry includes a description, usage context, and a concrete example value — so you can find the right header and copy it directly into your code or server config.
How to Use
- Search by header name or description keyword
- Filter by type: Request, Response, Both, or Security
- Click the copy button to copy the example value
Features
- 50 HTTP headers across 4 categories
- Search by name or description
- Filter by request, response, both, or security headers
- One-click copy for each example value
FAQ
What are security headers?
Security headers are response headers that instruct the browser to enable or restrict certain behaviors — like blocking XSS (CSP), enforcing HTTPS (HSTS), or preventing clickjacking (X-Frame-Options).
What is the difference between request and response headers?
Request headers are sent by the client to the server (e.g., Authorization, Accept). Response headers are sent by the server back to the client (e.g., Content-Type, Set-Cookie). Some headers like Cache-Control appear in both.
Which security headers should every site have?
At minimum: Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options (or CSP frame-ancestors), and Referrer-Policy. Content-Security-Policy provides the strongest XSS protection but requires more configuration.