Inhoudsopgave

Where do the 301 and 302 codes come from?

To explain the difference between a 301 and a 302 redirect, we need to start at the beginning. Every time your website is requested in a browser, it is retrieved from the server—a process also known as the Hypertext Transfer Protocol (HTTP),

When the server displays the website’s files, it returns a 200 status code. Visitors and Google can see the website. If the page is unavailable—for example, because it has been deleted—visitors and Google will see a 404 error message. That’s why you set up a redirect.

Thanks to the redirect, you can direct visitors and Google away from the 404 page to another page. The 301 and 302 redirects fall under the status code category: redirect class. Both essentially do the same thing: set up a redirect from page A to page B.

What is a 301 redirect?

A 301 redirect is a permanent redirect. For example, you set up a 301 redirect for a deleted page. The deleted page returns a 404 error message because it is no longer available. You don’t want visitors or Google to see this message. That’s why you set up a redirect to a (new) relevant page.

What is a 302 redirect?

A 302 redirect is a temporary redirect. Visitors and search engines are temporarily redirected from the old page to another page.

You set up this redirect because, for example, you’re performing maintenance on the page, such as updating your product lineup. The redirect is temporary, which immediately highlights the difference between the two types of redirects. But there’s more to it than just this difference.

What is the difference between a 301 and a 302 redirect?

The difference between a 301 and a 302 redirect lies in how search engines interpret them. As mentioned, a 301 redirect is a permanent redirect, while a 302 redirect is a temporary one. Visitors won’t notice this redirect, but Google does take note of which type of redirect you’ve set up.

When Google encounters a 301 redirect, it knows that the old page will no longer exist over time. That is why Google passes the value of the old page on to the new page to which the redirect points.

Every page builds up value, and this value determines, among other things, your ranking in search results. A new page has little to no value, so you’ll want to preserve the value of your old page. By setting up a 301 redirect, you can preserve this value.

With a 302 redirect, Google knows that it’s a temporary redirect and that the page will be used again at a later time. For this reason, Google does not pass on the accumulated value to the page the redirect points to.

How do I check if there are any redirects?

With our HTTP status code checker tool, you can easily check for redirects.

Set up the redirects correctly

Because of the difference between 301 and 302 redirects, it’s important to set them up correctly. If you’re performing temporary maintenance on your page, be sure to set up a 302 redirect. Google will simply visit the old URL again at a later time.

If you delete a page, set up a 301 redirect. This way, you’ll preserve the value you’ve built up, and the search engine will know that it no longer needs to visit the old URL over time. By setting up redirects correctly, you’ll maintain your ranking in the search results.

Jarik Oosting

This article is written by Jarik Oosting

With a passion for SEO and an unmatched drive for results, Jarik Oosting is the driving force behind SmartRanking. With over 15 years of experience in the field, he has built an extensive body of knowledge spanning technical SEO to complex site migrations. As the founder of SmartRanking, he has assembled a team of like-minded SEO specialists who help businesses achieve sustainable online growth.

His academic background in information science at the University of Groningen, with a specialization in natural language processing, gives him a unique perspective on the world of SEO. For Jarik, it’s not just about visibility in search engines, it’s about sharing knowledge and guiding businesses toward sustainable online success. That mission also led him to write a Dutch book about GEO.

More about SmartRanking