files/en-us/web/http/reference/headers/location/index.md
The HTTP Location {{Glossary("response header")}} indicates the URL to redirect a page to.
It only provides a meaning when served with a 3XX redirection response or a {{HTTPStatus("201", "201 Created")}} status response.
In redirections, the HTTP method used to make the redirected request to fetch the page pointed to by Location depends on the original method and the kind of redirection:
All responses with one of the above status codes include a Location header.
In cases of resource creation, it indicates the URL of the newly-created resource so that a client can make a request for it immediately.
Location and {{HTTPHeader("Content-Location")}} are different.
Content-Location indicates the URL to use to directly access the resource in future when content negotiation occurred.
Location is associated with the response, while {{HTTPHeader("Content-Location")}} is associated with the representation that was returned.
Location: <url>
<url>
Location: /index.html
{{Specifications}}
{{Compat}}
Location header: {{HTTPStatus("201")}}, {{HTTPStatus("301")}}, {{HTTPStatus("302")}}, {{HTTPStatus("303")}}, {{HTTPStatus("307")}}, {{HTTPStatus("308")}}.