Use a 301 redirect if you’ve permanently moved content, and use a 302 redirect if you’ve temporarily moved content.
301 redirect vs 302 redirect
|Redirect type||Use-case||Passes SEO value|
|301 redirect||Content permanently moved|
|302 redirect||Content temporarily moved||*|
* When a 302 redirect has been in place for a while, search engines may start seeing it as a permanent redirect and pass its SEO value on, similar to a 301 redirect.
301 redirect in more detail
The HTTP status code 301, 301 redirect for short, communicates the permanent nature of the content move, and tells search engines to pass on authority and relevance to the new URL.
In most cases, you’ll want to use a 301 redirect.
302 redirect in more detail
The HTTP status code 302, 302 redirect for short, communicates that content has been temporarily moved, and that search engines need to keep the old URL in the index.
The impact on visitors of using the 301 redirect vs. the 302 redirect
A visitor doesn’t notice whether you use a 301 and 302 redirect to send them to a different page, however a 301 redirect is cached by the visitors browser. Say the 301 redirect is removed, and a visitor hits the old URL they are redirected by their browser to the new URL.