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


More web hosts


More interesting articles

Status code 307 - What does a Temporary Redirect mean in HTTP?

We show you what the status code 307 means and how you can resolve it. Temporary Redirect in HTTP.

HTTP 504 Gateway Timeout: Causes and Solutions of Error 504

We explain the server error 504 including approaches to solutions. We are here to help!

11 Tricks for your htaccess file - this is how the htaccess works

We show you 11 tricks and hacks on how you can get the most out of your htaccess file.

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.

What is HTTP/3 and when will the standard be released?

HTTP/2 has now become a standard. But when will HTTP/3 be released and what does the new standard bring?

HTTP Error Service Unavailable 503: Causes and Solutions of Error 503

We explain the server error 503 including approaches to solutions. We are here to help!