What is the difference between 301 and 302?
A 301 is a permanent redirect and a 302 is a temporary one. Use a 301 when a page has moved for good; search engines pass the value of the old URL to the new one. A 302 is for short-lived situations and the old URL stays in the index. 308 and 307 are the versions of these that preserve the request method.