Response · Response header
Location
The redirect target (3xx) or newly created resource URL (201).
What is Location?
Location is repurposed: on 3xx redirects it points to the new URL; on 201 Created it points to the URL of the newly created resource.
Typical usage
Set on 3xx redirect responses and 201 Created responses.
Examples
Location: /users/42Location: https://new.example.com/Specification
RFC 9110 §10.2.2
Frequently asked questions
What is the Location HTTP header?
Location is repurposed: on 3xx redirects it points to the new URL; on 201 Created it points to the URL of the newly created resource.
Is Location a request or response header?
Location is a response header — the server sends it to the client. Set on 3xx redirect responses and 201 Created responses.
What does a Location header look like?
A typical Location header looks like: Location: /users/42.