tools

    HTTP reference

    Search HTTP status codes, headers, MIME types and CSP directives.

    Show
    342 entries

    Status codes 84

    • 100 Continue

      Informational

      The server has received the request headers and the client should go on to send the body. It is an interim response; the final status follows.

      Typical use: Sent after a client asks with Expect: 100-continue, so a large upload is not sent to a server that would reject it anyway.

      RFC 9110 §15.2.1

    • 101 Switching Protocols

      Informational

      The server agrees to the client’s Upgrade request and switches the connection to the protocol named in its own Upgrade header.

      Typical use: The handshake for WebSocket connections (and, historically, h2c upgrades).

      RFC 9110 §15.2.2

    • 102 Processing

      Informational

      An interim response from WebDAV telling the client that the server has accepted the full request but has not finished it, so the client should not time out.

      Typical use: Long-running WebDAV operations; rarely used today and dropped from the later WebDAV specification.

      RFC 2518 §10.1

    • 103 Early Hints

      Informational

      An interim response carrying headers, usually Link, that the client can act on while the server is still preparing the final response.

      Typical use: Lets browsers preload or preconnect to critical CSS, fonts and origins while the HTML is being generated.

      RFC 8297 §2

    • 200 OK

      Success

      The request succeeded. What the body holds depends on the method: the resource for GET, the result of the action for POST, nothing for HEAD.

      Typical use: The default success response for pages, API reads and most actions that return a body.

      RFC 9110 §15.3.1

    • 201 Created

      Success

      The request succeeded and created one or more new resources. The Location header, if present, points at the main new resource.

      Typical use: A successful POST or PUT that creates a record in a REST API.

      RFC 9110 §15.3.2

    • 202 Accepted

      Success

      The request has been accepted for processing, but processing is not complete and may still fail. There is no way to send the final outcome later in the same response.

      Typical use: Queued or asynchronous jobs; the body often links to a status endpoint to poll.

      RFC 9110 §15.3.3

    • 203 Non-Authoritative Information

      Success

      The request succeeded, but a transforming proxy has changed the content from the origin server’s 200 response.

      Typical use: Proxies that rewrite or annotate responses; seldom seen in practice.

      RFC 9110 §15.3.4

    • 204 No Content

      Success

      The request succeeded and there is no content to send. The response cannot have a body; headers such as ETag still apply.

      Typical use: Successful DELETE or PUT calls, saves that need no reply, and CORS preflight responses.

      RFC 9110 §15.3.5

    • 205 Reset Content

      Success

      The request succeeded and the client should reset the document view that sent it, for example clear a form.

      Typical use: Data entry forms that should be emptied after submission; browsers largely ignore it.

      RFC 9110 §15.3.6

    • 206 Partial Content

      Success

      The server is sending only the part of the resource asked for in the Range header, described by Content-Range (or a multipart/byteranges body).

      Typical use: Resuming downloads, seeking in audio and video, and parallel chunked downloads.

      RFC 9110 §15.3.7

    • 207 Multi-Status

      Success

      The body is an XML document with separate status codes for several resources or operations.

      Typical use: WebDAV operations such as PROPFIND that act on many resources at once.

      RFC 4918 §11.1

    • 208 Already Reported

      Success

      Inside a WebDAV multi-status response, the members of this binding were already listed earlier and are not repeated.

      Typical use: WebDAV binding extensions, to avoid listing the same collection twice.

      RFC 5842 §7.1

    • 226 IM Used

      Success

      The server fulfilled a GET and the response is the result of one or more instance manipulations, such as a delta, applied to the current instance.

      Typical use: HTTP delta encoding; almost never used.

      RFC 3229 §10.4.1

    • 300 Multiple Choices

      Redirection

      The resource has several representations, each with its own location, and the client or user should pick one.

      Typical use: Rare; content negotiation is usually done without asking the user.

      RFC 9110 §15.4.1

    • 301 Moved Permanently

      Redirection

      The resource has a new permanent URL, given in Location. Clients may change POST to GET when following it, for historical reasons.

      Typical use: Permanent URL changes and HTTP to HTTPS redirects; search engines move ranking to the new URL.

      RFC 9110 §15.4.2

    • 302 Found

      Redirection

      The resource is temporarily at another URL, given in Location. Clients may change POST to GET when following it.

      Typical use: Temporary redirects, login redirects and the classic redirect after a form post.

      RFC 9110 §15.4.3

    • 303 See Other

      Redirection

      The response to this request is at another URL, which the client should fetch with GET, whatever the original method was.

      Typical use: The Post/Redirect/Get pattern: send the user to a result page after a form submission.

      RFC 9110 §15.4.4

    • 304 Not Modified

      Redirection

      A conditional GET or HEAD found that the resource has not changed, so the client can use its cached copy. The response has no body.

      Typical use: Cache revalidation with If-None-Match or If-Modified-Since.

      RFC 9110 §15.4.5

    • 305 Use Proxy

      RedirectionDeprecated

      Defined in an earlier HTTP specification to ask the client to repeat the request through a proxy.

      Typical use: Not used; browsers ignore it for security reasons.

      Deprecated because it let a server pick a proxy for the client.

      RFC 9110 §15.4.6

    • 306 (Unused)

      RedirectionDeprecated

      Was “Switch Proxy” in a draft specification. The code is reserved and no longer has a meaning.

      Typical use: Never sent.

      Reserved.

      Also called Switch Proxy. RFC 9110 §15.4.7

    • 307 Temporary Redirect

      Redirection

      The resource is temporarily at the URL in Location, and the client must repeat the request there with the same method and body.

      Typical use: Temporary redirects that must keep POST as POST, and browser-internal HSTS upgrades.

      RFC 9110 §15.4.8

    • 308 Permanent Redirect

      Redirection

      The resource has a new permanent URL in Location, and the client must repeat the request there with the same method and body.

      Typical use: Permanent moves of API endpoints or any URL that receives POST, PUT or DELETE.

      RFC 9110 §15.4.9

    • 400 Bad Request

      Client error

      The server cannot or will not process the request because of something it sees as a client error, such as malformed syntax or invalid framing.

      Typical use: Malformed JSON, missing required parameters and general validation failures.

      RFC 9110 §15.5.1

    • 401 Unauthorized

      Client error

      The request lacks valid authentication credentials. The response must include a WWW-Authenticate header with a challenge saying how to authenticate.

      Typical use: Missing or expired tokens and wrong passwords; the client should sign in and retry.

      Also called Unauthenticated. RFC 9110 §15.5.2

    • 402 Payment Required

      Client error

      Reserved for future use. No standard behaviour is defined.

      Typical use: Some APIs and SaaS products use it for unpaid accounts or exhausted quotas.

      RFC 9110 §15.5.3

    • 403 Forbidden

      Client error

      The server understood the request but refuses to fulfil it. Unlike 401, authenticating again will not help.

      Typical use: Insufficient permissions, blocked IP addresses and CSRF check failures.

      RFC 9110 §15.5.4

    • 404 Not Found

      Client error

      The server has no current representation of the target resource, or will not say that one exists. It says nothing about whether this is temporary.

      Typical use: Unknown URLs and missing records; also used instead of 403 to hide that a resource exists.

      RFC 9110 §15.5.5

    • 405 Method Not Allowed

      Client error

      The resource exists but does not support the request method. The response must include an Allow header listing the methods it does support.

      Typical use: POST to a read-only endpoint, or DELETE where deletion is not offered.

      RFC 9110 §15.5.6

    • 406 Not Acceptable

      Client error

      The resource has no representation that matches the client’s Accept, Accept-Language or Accept-Encoding headers, and the server will not send a default.

      Typical use: Strict content negotiation in APIs; most servers send a default representation instead.

      RFC 9110 §15.5.7

    Headers 100

    • Accept

      Request

      Media types the client can handle, in order of preference with optional q weights.

      Accept: text/html,application/xhtml+xml;q=0.9,*/*;q=0.8

      content · RFC 9110 §12.5.1

    • Accept-CH

      Response

      Client hints the server wants the browser to send on later requests.

      Accept-CH: Sec-CH-UA-Platform-Version, Sec-CH-UA-Model

      client hints · RFC 8942 §3.1

    • Accept-Encoding

      Request

      Content codings (compression) the client understands.

      Accept-Encoding: gzip, deflate, br, zstd

      Note: Servers that compress based on it should send Vary: Accept-Encoding.

      content · RFC 9110 §12.5.3

    • Accept-Language

      Request

      Natural languages the user prefers, as BCP 47 tags with optional weights.

      Accept-Language: en-GB,en;q=0.9,de;q=0.7

      content · RFC 9110 §12.5.4

    • Accept-Ranges

      Response

      Says whether the server supports range requests for this resource, and in which unit.

      Accept-Ranges: bytes

      range · RFC 9110 §14.3

    • Access-Control-Allow-Credentials

      Response

      Lets the page read a cross-origin response to a request made with credentials (cookies, HTTP auth).

      Access-Control-Allow-Credentials: true

      Note: With true, Access-Control-Allow-Origin must name the origin; * is refused.

      cors, security · Fetch Standard, CORS protocol

    • Access-Control-Allow-Headers

      Response

      Request headers allowed in the actual request, sent in reply to a preflight.

      Access-Control-Allow-Headers: Content-Type, Authorization

      Note: * works only for requests without credentials and never covers Authorization.

      cors · Fetch Standard, CORS protocol

    • Access-Control-Allow-Methods

      Response

      Methods allowed in the actual request, sent in reply to a preflight.

      Access-Control-Allow-Methods: GET, POST, PUT, DELETE

      cors · Fetch Standard, CORS protocol

    • Access-Control-Allow-Origin

      Response

      Which origin may read the response: one origin, * or null.

      Access-Control-Allow-Origin: https://app.example.com

      Note: Only one origin is allowed; to allow several, echo a vetted request Origin and send Vary: Origin. Never echo every origin together with credentials.

      cors, security · Fetch Standard, CORS protocol

    • Access-Control-Expose-Headers

      Response

      Response headers, beyond the safelisted ones, that scripts may read.

      Access-Control-Expose-Headers: Content-Range, X-Request-Id

      cors · Fetch Standard, CORS protocol

    • Access-Control-Max-Age

      Response

      How many seconds the browser may cache a preflight result.

      Access-Control-Max-Age: 600

      Note: Browsers cap it: Chromium at 2 hours, Firefox at 24 hours.

      cors, caching · Fetch Standard, CORS protocol

    • Access-Control-Request-Headers

      Request

      Sent in a preflight: the non-safelisted headers the actual request will use.

      Access-Control-Request-Headers: content-type, authorization

      cors · Fetch Standard, CORS protocol

    • Access-Control-Request-Method

      Request

      Sent in a preflight: the method the actual request will use.

      Access-Control-Request-Method: PUT

      cors · Fetch Standard, CORS protocol

    • Age

      Response

      Seconds since the response was generated or revalidated at the origin, added by caches.

      Age: 3600

      caching · RFC 9111 §5.1

    • Allow

      Response

      Methods the resource supports. Required with 405 Method Not Allowed.

      Allow: GET, HEAD, POST

      content · RFC 9110 §10.2.1

    • Alt-Svc

      Response

      Advertises other protocols or endpoints that serve the same origin, such as HTTP/3.

      Alt-Svc: h3=":443"; ma=86400

      connection · RFC 7838 §3

    • Authorization

      Request

      Credentials that authenticate the client with the origin server.

      Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…

      Note: Not a CORS-safelisted header: cross-origin requests that send it need a preflight. Browsers drop it on cross-origin redirects.

      auth, security · RFC 9110 §11.6.2

    • Cache-Control

      Request and response

      Caching directives: max-age, no-cache (revalidate first), no-store (never store), private, public, immutable, stale-while-revalidate and more.

      Cache-Control: public, max-age=31536000, immutable

      Note: Use no-store for responses with personal data; no-cache still stores the response.

      caching · RFC 9111 §5.2

    • Cache-Status

      Response

      How each cache along the path handled the request: hit, forwarded, stored, and why.

      Cache-Status: ExampleCDN; hit; ttl=300

      caching, proxy · RFC 9211 §2

    • CDN-Cache-Control

      Response

      Cache directives aimed only at CDNs, overriding Cache-Control for them.

      CDN-Cache-Control: max-age=600

      caching, proxy · RFC 9213 §2

    • Clear-Site-Data

      Response

      Tells the browser to clear cookies, storage, cache or execution contexts for the origin.

      Clear-Site-Data: "cache", "cookies", "storage"

      Note: Useful on sign-out. Only honoured over HTTPS.

      security, cookies · W3C Clear Site Data

    • Connection

      Request and response

      Options for the current connection, such as close, and the hop-by-hop headers that must not be forwarded.

      Connection: close

      Note: Forbidden in HTTP/2 and HTTP/3.

      connection · RFC 9110 §7.6.1

    • Content-Disposition

      Response

      Whether the body is shown inline or downloaded as an attachment, and the suggested file name.

      Content-Disposition: attachment; filename="report.pdf"; filename*=UTF-8''r%C3%A9sum%C3%A9.pdf

      Note: Also used inside multipart/form-data parts to name each field.

      content · RFC 6266 §4

    • Content-Encoding

      Request and response

      Compression applied to the body, which the recipient must undo.

      Content-Encoding: br

      content · RFC 9110 §8.4

    • Content-Language

      Request and response

      Natural language of the intended audience of the content.

      Content-Language: de-DE

      content · RFC 9110 §8.5

    • Content-Length

      Request and response

      Size of the body in bytes.

      Content-Length: 3495

      content · RFC 9110 §8.6

    • Content-Location

      Response

      A URL for the specific representation returned, when it differs from the request URL.

      Content-Location: /documents/foo.json

      content · RFC 9110 §8.7

    • Content-Range

      Response

      Which part of the full resource a partial body holds, and the full size.

      Content-Range: bytes 200-1023/146515

      range · RFC 9110 §14.4

    • Content-Security-Policy

      Response

      Restricts where scripts, styles, images, frames and other resources may load from.

      Content-Security-Policy: default-src 'self'; script-src 'self' 'nonce-r4nd0m'; object-src 'none'

      Note: A strict nonce- or hash-based policy is the main defence in depth against XSS.

      security · W3C CSP Level 3

    • Content-Security-Policy-Report-Only

      Response

      Reports CSP violations without blocking anything, to test a policy before enforcing it.

      Content-Security-Policy-Report-Only: default-src 'self'; report-to csp

      security, reporting · W3C CSP Level 3

    MIME types 119

    • text/html

      HTML document · .html.htm

    • text/css

      Cascading Style Sheets · .css

    • text/javascript

      JavaScript; the official type since RFC 9239 · .js.mjs

    • text/plain

      Plain text · .txt.text.log

    • text/csv

      Comma-separated values · .csv

    • text/tab-separated-values

      Tab-separated values · .tsv

    • text/markdown

      Markdown · .md.markdown

    • text/calendar

      iCalendar event or calendar · .ics

    • text/vcard

      vCard contact · .vcf.vcard

    • text/xml

      XML that is readable as text; prefer application/xml

    • text/event-stream

      Server-sent events stream

    • text/vtt

      WebVTT subtitles and captions · .vtt

    • text/rtf

      Rich Text Format · .rtf

    • text/x-python

      Python source · .py

    • text/x-c

      C source · .c.h

    • text/x-java-source

      Java source · .java

    • text/x-sh

      Shell script · .sh

    • application/json

      JSON · .json

    • application/ld+json

      JSON-LD linked data · .jsonld

    • application/manifest+json

      Web app manifest · .webmanifest

    • application/geo+json

      GeoJSON · .geojson

    • application/problem+json

      Problem details for HTTP APIs (RFC 9457)

    • application/json-patch+json

      JSON Patch (RFC 6902)

    • application/merge-patch+json

      JSON Merge Patch (RFC 7396)

    • application/x-ndjson

      Newline-delimited JSON · .ndjson.jsonl

    • application/xml

      XML document · .xml.xsd.xsl

    • application/xhtml+xml

      XHTML document · .xhtml

    • application/atom+xml

      Atom feed · .atom

    • application/rss+xml

      RSS feed · .rss

    • application/yaml

      YAML (RFC 9512) · .yaml.yml

    CSP directives 39

    • default-src

      Fetch directive

      Fallback for every fetch directive that is not set.

      default-src 'self'

      Note: Start strict ('none' or 'self') and open up per resource type.

    • script-src

      Fetch directive

      Where scripts may load from and whether inline scripts, event handlers and eval may run.

      script-src 'nonce-r4nd0m' 'strict-dynamic'

      Note: A nonce or hash with 'strict-dynamic' is the recommended strict policy; host allowlists are easy to bypass.

      Falls back to default-src.

    • script-src-elem

      Fetch directive

      Sources for <script> elements only, overriding script-src for them.

      script-src-elem 'self' https://cdn.example.com

      Falls back to script-src.

    • script-src-attr

      Fetch directive

      Inline event handler attributes such as onclick.

      script-src-attr 'none'

      Falls back to script-src.

    • style-src

      Fetch directive

      Where style sheets may load from, and whether inline styles may apply.

      style-src 'self' 'nonce-r4nd0m'

      Falls back to default-src.

    • style-src-elem

      Fetch directive

      <style> elements and <link rel="stylesheet">.

      style-src-elem 'self' https://fonts.googleapis.com

      Falls back to style-src.

    • style-src-attr

      Fetch directive

      Inline style attributes on elements.

      style-src-attr 'unsafe-inline'

      Falls back to style-src.

    • img-src

      Fetch directive

      Images and favicons.

      img-src 'self' data: https://images.example.com

      Falls back to default-src.

    • font-src

      Fetch directive

      Fonts loaded with @font-face.

      font-src 'self' https://fonts.gstatic.com

      Falls back to default-src.

    • connect-src

      Fetch directive

      URLs scripts may contact: fetch, XHR, WebSocket, EventSource and sendBeacon.

      connect-src 'self' https://api.example.com wss://live.example.com

      Falls back to default-src.

    • media-src

      Fetch directive

      <audio>, <video> and <track> sources.

      media-src 'self' https://media.example.com

      Falls back to default-src.

    • object-src

      Fetch directive

      <object> and <embed> plugin content.

      object-src 'none'

      Note: Set it to 'none'; plugins are a common bypass.

      Falls back to default-src.

    • frame-src

      Fetch directive

      Pages that may load in <iframe> and <frame> on this page.

      frame-src https://www.youtube-nocookie.com

      Falls back to child-src, then default-src.

    • child-src

      Fetch directive

      Frames and workers, when frame-src or worker-src is not set.

      child-src 'self'

      Falls back to default-src.

    • worker-src

      Fetch directive

      Scripts for Worker, SharedWorker and service workers.

      worker-src 'self'

      Falls back to child-src, then script-src, then default-src.

    • manifest-src

      Fetch directive

      Web app manifests.

      manifest-src 'self'

      Falls back to default-src.

    • base-uri

      Document directive

      URLs allowed in <base href>, which changes how relative URLs resolve.

      base-uri 'none'

      Note: Does not fall back to default-src; set it, or injected <base> tags can redirect scripts.

    • sandbox

      Document directive

      Applies iframe-style sandbox restrictions to the page, with allow-* exceptions.

      sandbox allow-scripts allow-forms

      Note: Ignored in <meta> policies and in report-only mode.

    • form-action

      Navigation directive

      URLs forms on the page may submit to.

      form-action 'self'

      Note: Does not fall back to default-src.

    • frame-ancestors

      Navigation directive

      Which pages may embed this one in a frame; protects against clickjacking.

      frame-ancestors 'none'

      Note: Replaces X-Frame-Options. Ignored in <meta> policies; send it as a header.

    • report-to

      Reporting directive

      Names a Reporting-Endpoints group that violation reports are sent to.

      report-to csp
    • report-uri

      Reporting directiveDeprecated

      URL that receives violation reports as JSON POST requests.

      report-uri https://example.com/csp-reports

      Note: Still the only reporting option in some browsers; send it together with report-to.

      Replaced by report-to.

    • upgrade-insecure-requests

      Other directive

      Rewrites the page’s http: subresource and same-site navigation URLs to https: before fetching.

      upgrade-insecure-requests
    • require-trusted-types-for

      Other directive

      Makes DOM XSS sinks such as innerHTML accept only Trusted Types objects: 'script'.

      require-trusted-types-for 'script'
    • trusted-types

      Other directive

      Names the Trusted Types policies the page may create.

      trusted-types default dompurify 'allow-duplicates'
    • block-all-mixed-content

      Other directiveDeprecated

      Blocked every http: subresource on an https: page.

      block-all-mixed-content

      Browsers now upgrade or block mixed content themselves.

    • 'self'

      Source expression

      The page’s own origin (scheme, host and port); also allows the https: and wss: upgrades of it.

      default-src 'self'
    • 'none'

      Source expression

      Nothing; must be the only value of the directive.

      object-src 'none'
    • 'unsafe-inline'

      Source expression

      Allows inline <script>, <style>, event handlers and javascript: URLs.

      style-src 'self' 'unsafe-inline'

      Note: Defeats most XSS protection for scripts. Ignored when a nonce or hash is also present.

    • 'unsafe-eval'

      Source expression

      Allows eval(), new Function() and string arguments to setTimeout.

      script-src 'self' 'unsafe-eval'