301 Redirect/Redirection - how does the HTTP status code 301 affect?

Author: HOSTTEST Editorial   | 3 Sept 2021

301 RedirectTo ensure the integrity of content, identities, and communication, the Hypertext Transfer Protocol (HTTP) responsible for delivering web pages uses responses when establishing a connection. When this connection is established, the server sends a 100, 200, or 300 status code, providing additional information, confirming a successful operation, or indicating a temporary or permanent redirection. The latter usually refers to the 301 Moved Permanently status code, which, unlike a temporary code 307 or permanent redirect code 308, signifies a permanent relocation of the website to a new address.

What is the purpose of a 300 status code?

The response from a web server (HTTP response) regarding the status of a request is divided into five different categories, each encompassing a block of numbers from 100 possible responses. The categorisation is derived simply from the first digit and includes:

  • Status code 100: providing additional information such as switching to another protocol
  • Status code 200: request successfully processed and response sent
  • Status code 300: retrieval requires redirection to other resources
  • Status code 400: client error preventing communication or data transfer
  • Status code 500: server unable to process a correct request properly

In addition to the officially defined and universally valid standards like the 301 Moved Permanently status code, there is also an unofficial range from codes 900 to 999, which is occasionally used by proprietary - i.e., commercial and non-Open Source licensed - software for their own purposes.

A 300 status code is not a disruption that fundamentally prevents communication, unlike HTTP Error 404 Not Found or the commonly encountered Error 502 Bad Gateway. Instead, the server responsible for web hosting informs the client about a move to another domain or subpage that it can use instead of the currently used one.

What is the uniqueness of a status code 301?

Every 300 status code describes a redirection to a new instance, with the address explicitly specified in the header as a variable named Location. The differences between the individual messages lie in how the redirect should be processed and which HTTP method should be used for communication. The 301 Moved Permanently status code informs the client that the requested resource has been permanently moved to a new address, instructing it to establish its own and completely independent connection with this counterpart.

In contrast, the codes 307 Temporary Redirect and 308 Permanently Redirect indicate a redirection within a website, where a client can directly retrieve the desired information using the method employed - usually a POST or GET request. Existing data, such as in a local cache or stored cookies, remains valid and does not need to be replaced or manipulated.

Another distinction lies in a temporary redirection, as seen in the HTTP codes 302 Found (Moved Temporarily) or 307 Temporary Redirect. These indicate that the old address still remains valid, but for a limited period can be found at a new resource. This fundamentally differs from the 301 Moved Permanently and 308 Permanent Redirect status codes, where the former URL is permanently declared invalid, meaning no content will be available there now or in the future.

From an SEO perspective, it is advisable to use a 301 status code for permanent moves, as search engines will assign the new instance the same quality as the old one, thereby maintaining the ranking. This sets it apart from the 302 Found (Moved Temporarily) code, where both the original and temporary redirect are considered valid, potentially not transferring the value and PageRank. Additionally, a 302 redirect can lead search engines to index both sites and classify the content as duplicate, resulting in a ranking penalty.

What measures are required for a 301 status code?

Among the information conveyed by a 300 status code is the indication of a new address, which the header passes to the client in the form of the Location variable. The redirection to this resource then occurs automatically, for example, through the browser being used. In practice, the user therefore does not explicitly see the status code 301 Moved Permanently or another redirect, as is the case with clear error messages such as Error 405, Error 410, or Error 429. Like any 300 status code, it is only internally evaluated, so a visitor typically does not take note of a redirection unless they inspect the extended headers or page source code. An active response is therefore only necessary in exceptional cases - for example, if the redirect leads to incompatible requests such as an HTTP Error 400 Bad Request.

Photo: Free-Photos on Pixabay

Write a comment


    Tags for this article

  • HTTP

More web hosts


More interesting articles

HTTP 408 Error: Request Timeout - where does it come from and what solution is available?

HTTP 408 Error: Request Timeout - where does it come from and what solution is available?

HTTP Error 502 - what causes it and what is the solution?

HTTP Error 502 crashes your website? We show you what causes it and how to fix the error.

http Error 522 - Connection timed out - how to fix the error

The error http Error 522 - Connection timed out - how to fix the error.

What is an HTTP Request? Simply explained

We simply explain what an HTTP Request is.

HTTP Error 403: Forbidden - what is the solution?

HTTP Error 403: Forbidden - this is how you can solve the error.

Too Many Requests - what is error 429 and how does it occur?

Too Many Requests is not a popular error. We tell you how you can avoid it.