Planning a redirect? Chances are you're looking at implementing a 301 redirect or a 302.
While they are just one number away from each other and they have similarities, it's very important to differentiate between the two. Make sure you know which one to choose because search engines know the difference!
Here's what you need to know about both.
A 301 redirect is best for a permanent move. If you are moving to a new website, this is most likely the right choice.
This is also the case if you are changing the URL of your website, a new domain, or merging two pages.
302 redirects are used far less than 301 redirects.
As the Ahrefs blog said, "Use cases for 302 redirects are few and far between. . . The golden rule is that you should only use 302 redirects if you plan to bring back the old page after a short period."
Examples they gave of this could be split testing, temporary promotions, or similar reasons.
What happens if you use the wrong one?
Choosing the wrong redirect can potentially have lasting negative effects on SEO, but in some cases Google will be able to figure it out. If you suspect you made an error, in most cases it is best practice to go back and fix it.
If you remember that 301 is permanent and 302 is temporary, you will be just fine!