When a webpage moves or its URL changes, you may encounter what is called a 404 page.
The 404 page simply tells you that the page you were looking for cannot be found. When you still want users to find the information the page contained, you will need to redirect the old URL to a new URL.
These redirections are typically referred to as 301 redirects though they can also encompass 302 redirects. Think of them like a forwarding address you file with the Post Office after you’ve moved.
What’s the difference?
Both the 301 and 302 tell search engines that a page has moved to a new location with similar or equivalent content. Both will also pass PageRank in Google.
Typically, a 301 is used when a change is permanent, while a 302 is used if the change may be temporary and the old URL may become available in the future. It’s important to choose one. Otherwise, people will get a 404 error.
Read “Is a 301 or 302 redirect best for SEO” to learn more about their differences and how Google and Bing index redirected pages.