Skip to content
  1. Home
  2. Inbound Marketing and Sales Blog

302 redirect: how it is done and how it helps the SEO of your website

Index Content

As a website owner, sooner or later you will need to redirect URLs from one page of your website to another. Today we want to talk about 302 redirects, another way to tell Google that the URL of a page has changed and that differs in some aspects from 301 redirects.

In this article I will try to give you an answer to all these questions so that you have a little clearer how to make redirects and how they help the SEO of your website.

What are 301 and 302 redirects

A redirect is a directive in a web server that tells the server that when a user accesses a URL A (which does not exist) the web server should redirect to the alternative URL B. In short, 301 and 302 redirects are a way of telling Google's crawler or its crawling robot that the URL of a web page has changed permanently or temporarily.

It is a kind of redirection so that when a user loads the old URL, they are automatically redirected to the new URL that we have applied, without them even being aware of it.

  • 301 redirection

Every time you enter the 301 code, which is an HTTP status code, you are dealing with a permanent redirect, which is used when the URL address of a page has changed.

When we apply a 301 redirect to a URL that is already well positioned in the search engines, the next time the robot (or bot) of Google or another search engine visits that page, it will understand that the URL is already obsolete and will replace it with the new URL to which the redirect points.

  • 302 redirect

A 302 redirect is a redirect that is done temporarily and therefore does not pass on any power to the new URL, i.e. it does not inherit its authority. This means that when traffic returns to the original URL, i.e. when the 302 redirect is removed, it will not have lost its ranking in the SERPs.

One of the most notable features that differentiates it from a 301 redirect is that, in the case of 302 redirects, the SEO power is not passed on to the new URL.

¡QUIERO SEO!

How to do it

If you have your website on WordPress there are many free plugins dedicated to making redirects very easily, so if you don't want to modify files and tinker with code, this is definitely the best option.

If you work with HubSpot you have to follow the path Content Settings -> URL COS Mappings. At the top right you have to click on "Add a new direct" and configure the type of redirection you want to apply.

Without a doubt, the best way to do a 302 redirect is via the.htaccess file, although you can only do this if you have Apache servers. Also, Apache must have the "mod_rewrite" parameter enabled in order to do this redirect. It is usually enabled by default, but if not, your hosting provider can take care of it.

You will need to access the root of your installation using the FTP client of your choice. Remember that if you don't have the data for this you can ask your hosting provider for it again without any problem. You will find the .htaccess file in the same root so you won't have to navigate through the different folders and files.

Although ideally you should open the file with any code editor, you can also open it with Windows Notepad or any program that allows you to work with plain text. As always, make a backup copy of the file before you start working with it, just in case.

How they help our SEO

As mentioned above, 302 redirects do not rely on the transfer of SEO power from the original page to the new URL. This is because this redirect is designed to be used when there is a need to redirect content to a page that will not be the final page. Thus, once the redirect is removed, the original page will not have lost its search engine ranking.

Use a 302 only if you are sure that you will be able to display the original page again in the near future. If you are not sure, it is better to set up a permanent 301 redirect, as this will avoid duplicate content. Why? Because Google will retain both the old and the new content, interpreting the redirect as temporary.

Use redirects with care, as Google detects them and, depending on the code you use, will index one page or another. Remember that the fewer redirects on your website, the better.


want to know if broken links are hurting your SEO? Click here and find out how to fix it.

Nueva llamada a la acción

You can be interested as well...

how can you turn your online business into an industry leader? how can you turn your online business into an industry leader?
what is the BANT method and how does it help to increase sales? what is the BANT method and how does it help to increase sales?
how can I improve the image of my online shop? how can I improve the image of my online shop?