Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1105329 of 302 Found

  • Revision slug: Web/HTTP/Status/302
  • Revision title: 302 Found
  • Revision id: 1105329
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

The HTTP 302 Found redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the {{HTTPHeader("Location")}} headers. Browser redirects to this page, but search engines updates their link to the resource (In SEO-speak, it is said that the link-juice is not sent to the new URL).

Even if the specification requires the method, and the body, not to be altered when the redirection is performed, not all user-agents did it, and you can still find buggy software out there. It is therefore recommended to the 301 code only as a return for {{HTTPMethod("GET")}} or {{HTTPMethod("HEAD")}} methods an to use {{HTTPStatus("307")}} Temporary Redirect instead, as the method change is explicitly prohibited in that case.

In the cases where you want the method used to be changed to {{HTTPMethod("GET")}}, use {{HTTPStatus("303")}} See Also instead. This is useful when you want to give an answer to a {{HTTPMethod("PUT")}} method that is not the uploaded resources, but a confirmation message (like "You successfully uploaded XYZ").

Status

302 Found

Specifications

Specification Title
{{RFC("7231", "302 Found" , "6.4.3")}} Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content

Browser compatibility

{{Compat}}

See also

  • {{HTTPStatus("308")}} Temporary Redirect, the equivalent of this status code, but that never changes the method used.
  • {{HTTPStatus("303")}} See Also, a temporary redirect that changes the metod used to {{HTTPMethod("GET")}}.
  • {{HTTPStatus("301")}} Found, the temporary redirect

Revision Source

<div>{{HTTPSidebar}}</div>

<p>The HTTP <code><strong>302</strong></code><strong><code> Found</code></strong> redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the {{HTTPHeader("Location")}} headers. Browser redirects to this page, but search engines updates their link to the resource (In SEO-speak, it is said that the link-juice is not sent to the new URL).</p>

<p>Even if the specification requires the method, and the body, not to be altered when the redirection is performed, not all user-agents did it, and you can still find buggy software out there. It is therefore recommended to the <code>301</code> code only as a return for {{HTTPMethod("GET")}} or {{HTTPMethod("HEAD")}} methods an to use {{HTTPStatus("307")}} <code>Temporary Redirect</code> instead, as the method change is explicitly prohibited in that case.</p>

<p>In the cases where you want the method used to be changed to {{HTTPMethod("GET")}}, use {{HTTPStatus("303")}} <code>See Also</code> instead. This is useful when you want to give an answer to a {{HTTPMethod("PUT")}} method that is not the uploaded resources, but a confirmation message (like "You successfully uploaded XYZ").</p>

<h2 id="Status">Status</h2>

<pre class="syntaxbox">
302 Found</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("7231", "302 Found" , "6.4.3")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you’d like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data/README.md">https://github.com/mdn/browser-compat-data/README.md</a> and send us a pull request.</p>

<p>{{Compat}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{HTTPStatus("308")}} <code>Temporary Redirect</code>, the equivalent of this status code, but that never changes the method used.</li>
 <li>{{HTTPStatus("303")}} <code>See Also</code>, a temporary redirect that changes the metod used to {{HTTPMethod("GET")}}.</li>
 <li>{{HTTPStatus("301")}} <code>Found</code>, the temporary redirect</li>
</ul>
Revert to this revision