Spec-Zone.ru › HTTP

Status: 302

302 Found

The HTTP 302 Found redirection response status code indicates that the requested resource has been temporarily moved to the URL in the Location header.

A browser receiving this status will automatically request the resource at the URL in the Location header, redirecting the user to the new page. Search engines receiving this response will not attribute links to the original URL to the new resource, meaning no SEO value is transferred to the new URL.

Note: In the Fetch Standard, when a user agent receives a 302 in response to a POST request, it uses the GET method in the subsequent redirection request, as permitted by the HTTP specification. To avoid user agents modifying the request, use 307 Temporary Redirect instead, as altering the method after a 307 response is prohibited.

In cases where you want any request method to be changed to GET, use 303 See Other. This is useful when you want to give a response to a PUT method that is not the uploaded resource but a confirmation message such as: "you successfully uploaded XYZ".

Status

302 Found

Examples

>

302 response with new URL

GET /profile HTTP/1.1
Host: www.example.com
HTTP/1.1 302 Found
Location: https://www.example.com/new-profile-url
Content-Type: text/html; charset=UTF-8
Content-Length: 0

Specifications

Specification
Unknown specification>
# status.302>

See also

  • Redirections in HTTP
  • HTTP response status codes
  • 307 Temporary Redirect, equivalent to 302 but the request method is not modified
  • 303 See Other, a temporary redirect that changes the method to GET
  • 301 Moved Permanently, a permanent redirect.

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/302

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API