HTTPREF
← Back to headers

HTTP Header

Origin

CORS

Indicates the origin that initiated the request, mainly used in CORS and security contexts.

HTTP header reference, syntax, examples, and developer usage.

What is the Origin header?

The Origin HTTP header is used to transmit metadata between a client and server as part of HTTP requests or responses.

HTTP headers define how content should be interpreted, cached, authenticated, secured, or processed by browsers and APIs.

Direction

This header may appear in both HTTP requests and responses.

Syntax

Origin: scheme://host:port

Example

Origin: https://app.example.com

Common use cases

  • CORS validation
  • Cross-site request checks
  • Browser security enforcement

Common mistakes

  • Using the header in the wrong request or response context
  • Sending invalid header values
  • Incorrect header syntax
  • Assuming the header automatically changes server behaviour

Related headers