Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTTP
  3. Reference
  4. HTTP response status codes
  5. 301 Moved Permanently

301 Moved Permanently

The HTTP301 Moved Permanentlyredirection response status code indicates that the requested resource has been permanently moved to the URL in theLocation header.

A browser receiving this status will automatically request the resource at the URL in theLocation header, redirecting the user to the new page.Search engines receiving this response will attribute links to the original URL to the redirected resource, passing theSEO ranking to the new URL.

Note:In theFetch Standard, when a user agent receives a301 in response to aPOST request, it uses theGET method in the subsequent redirection request, as permitted by the HTTPspecification.To avoid user agents modifying the request, use308 Permanent Redirect instead, as altering the method after a308 response is prohibited.

Status

http
301 Moved Permanently

Examples

301 response to a moved resource

The followingGET request is made to a resource with a301 redirection in place.

http
GET /en-US/docs/AJAX HTTP/2Host: developer.mozilla.orgUser-Agent: curl/8.6.0Accept: */*

The response includes the301 status along with theLocation header that indicates the URL where the resource has moved.

http
HTTP/2 301cache-control: max-age=2592000,publiclocation: /en-US/docs/Learn_web_development/Core/Scripting/Network_requestscontent-type: text/plain; charset=utf-8date: Fri, 19 Jul 2024 12:57:17 GMTcontent-length: 97Moved Permanently. Redirecting to /en-US/docs/Learn_web_development/Core/Scripting/Network_requests

Specifications

Specification
HTTP Semantics
# status.301

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp