The HTTP 301 status code, also known as “Moved Permanently,” is a web server response status that indicates a permanent redirection from one URL[2] to another. This often occurs when a webpage has been moved to a new location and the original URL is no longer valid. When a server sends a 301 status code, it also includes the new URL in the “Location” field. This status code is especially important for optimisation des moteurs de recherche[1] (SEO), as it allows search engines to update their records and transfer any link equity from the old URL to the new one. However, it is crucial to use 301 redirects sparingly to avoid increased page load times and potential dilution of SEO value. Furthermore, when redirecting from HTTP to HTTPS, make sure all resources on a page are loaded over HTTPS to prevent mixed content issues. Finally, remember that many web browsers cache 301 redirects, which means they will automatically direct any future requests to the new URL.
On the World Wide Web, HTTP 301 est le HTTP response status code pour 301 Moved Permanently. It is used for permanent redirecting, meaning that links or records returning this response should be updated. The new URL should be provided in the Location field, included with the response. The 301 redirect is considered a best practice for upgrading users from HTTP to HTTPS.
RFC 2616 states that:
- If a client has link-editing capabilities, it should update all references to the Request URL.
- The response is cacheable unless indicated otherwise.
- Unless the request method was HEAD, the entity should contain a small hypertext note with a hyperlink to the new URL(s).
- If the 301 status code is received in response to a request of any type other than GET or HEAD, the client must ask the user before redirecting.