In most situations, you should use a 301 redirect. The 301 redirect communicates that content has been permanently moved from one location to another, ensuring that the redirect target inherits most of the redirected URL’s authority as soon as possible.
Why is a 301 redirect the best choice?
Why is the 301 redirect the best choice in most cases? Because in most of the cases, content has been permanently moved from one URL to another, and you want that new URL to start ranking as soon as possible.
In SEO, we don’t have time to wait. You need to communicate as clear as possible, and keep uncertainty to a minimum.
When not to use the 301 redirect, but a 302 redirect
There are cases in which you don’t shouldn’t use the 301 redirect. For instance when you temporarily want to redirect visitors to another page, for instance with a “Summer sale” campaign. In that case you’d use a 302 redirect.
During the campaign, you’ll find that the redirected page will remain in search engine’s indices, and the redirect target (where visitors are redirect to) is indexed as well. Read more about 301 vs 302 redirect.