News

News

Javajan. 301 vs. 302 redirection

A redirect is a method used to go from one URL to another automatically. There are different redirects, each one is appropriate according to the case to be solved. The purpose of these is usually for SEO and usability issues for the user. We will deal with the 2 most used redirects which are 301 and 302.

The 301 redirect is a permanent redirect. That is to say, when the URL of a page has been modified or deleted and we want to redirect the traffic to the new URL. This redirection allows to maintain the positioning of the old URL and to transfer it to the new URL, and to tell the Google robot to understand that this URL has changed and we wish to substitute it for a new URL. This happens for example when:

  • A product is no longer marketed and a new product has been released to replace it.
  • An optimization of URL’S has been made.
  • Indexed URL’S that cause a 404 error.

When Google finds a 301 redirect, it reacts as follows:

  • It replaces the entire Snippet* or SERP to the results pages of the old URL and replaces it with the content of the new URL.

In this case, it is advisable not to remove the redirects before one year after they have been modified.

The 302 redirect, on the other hand, is a temporary redirect. It serves to temporarily redirect traffic from one URL to another. In this case, we tell the Google robot not to update the Snnipet or SERP with the content of the new URL, since the change is temporary. This happens for example when:

  • A product temporarily does not want to show a web but we do not want to lose the positioning it has.
  • A section of a corporate website we do not want to show for a while but we do not want to lose the positioning it has.

*** SNIPPET OR SERP: it is the summary and link of the website that appears in Google search results. Formed by the title of the page, description and web address, URL.

Related posts