HTTP status code 301 indicates that the requested resource has been permanently moved to a new URL. This informs the client (e.g., a browser) that the URI of the resource has changed and that future requests should use the new URI.
When a client sends a request with the old URI, the server returns a 301 status code and specifies the new URI in the response header (via the Location
header). The client should use this new URI in future requests.
Characteristics of 301 Redirects
-
Permanence: A 301 status indicates that the resource’s move is permanent, and the client should use the new URI for all future requests.
-
Search Engine Optimization (SEO): For search engines, a 301 redirect passes most of the link equity (SEO value) to the new URI, helping maintain the website’s search engine ranking.
-
Client Behavior: Most browsers automatically redirect to the new URI when encountering a 301 status code, without user intervention.
-
Response Header: When returning a 301 status code, the server must include a
Location
header specifying the new, permanent URI.