301 Moved Permanently
The resource has a new permanent URL, given in Location. A browser may change a POST to a GET when it follows; 308 does not allow that.
What to do
Update links and bookmarks to the URL in Location. Browsers and search engines remember a 301, so test one before shipping it. A POST may become a GET when it is followed. Use 308 to keep the method.
- Class
- 3xx Redirection. The client has to take another step to complete the request.
- Registered
- Yes, in the IANA HTTP status code registry.
- Cacheable by default
- Yes. A cache may store it without Cache-Control or Expires saying to.
- References
- RFC 9110 ยง15.4.2 · MDN
Example response
HTTP/1.1 301 Moved Permanently Location: https://example.com/new-page