301 and 302 redirects

A redirect with code 301 indicates a permanent change of address and passes the value of the original page to the new one, including the links pointing to it. Code 302 means a temporary redirect, and the search engine keeps the original address in its index. Confusing the two is a common mistake during a website redesign or migration, and its consequence tends to be a loss of rankings, because the new address does not inherit the authority of the old one. When changing a website's structure, a mapping of every old address to its closest new equivalent needs to be prepared, rather than redirecting everything to the homepage – such a redirect is evaluated as an error and the value is lost. Redirects need to stay functional in the long term, and chaining them should be avoided, as it unnecessarily slows down and weakens the transfer of value.

See also: Redirect chains, Website migration without losing rankings, HTTP status codes.