Back to HTTP Headers
Request

HTTP Origin Header

Indicates where the request originates from. Used in CORS to determine if the server allows cross-origin requests.

Purpose

Tells the server the origin (scheme, host, and port) of the request for CORS validation and security purposes.

Origin: null Origin: <scheme>://<hostname>:<port> Example: Origin: https://myapp.com Example: Origin: https://myapp.com:3000

Code Examples

See how to use the Origin header in different tools and languages.

curl -H "Origin: https://myapp.com" -I https://api.example.com/data
# Check if the response allows this origin
# Access-Control-Allow-Origin: https://myapp.com

Related Headers

Test Your APIs

origin headerhttp originhttp headers guide