If you plan to modify your websites structure or move it to a new location then it’s imperative you ensure all web pages are 301 redirected to their new locations. Failure to do this could lead to your site losing in visibility in search and preventing users finding your content.
What are 301 Redirects?
301 redirects tell Google that the page they are trying to crawl has been moved to a new location. If Google see’s that it has been 301’d it will eventually start to rank the new page in it’s own right and forget the old page whilst maintaining the new page’s position within search. Redirects also ensure that if a user tries to access an old page, they are automatically sent to the new version of that page.
Now, if you don’t 301 redirect a page to it’s new version then Google will ‘forget’ the old page and treat the new page as…a new page thus starting from scratch in terms of ranking positions.
Example 1: Change in URL Structure
If you are changing your URL structure, it’s crucial you 301 the old to the new:
OLD PAGE: www.widgets.com/red-widgets.html [301 Redirect to] NEW PAGE: www.widgets.com/red-widgets
OLD PAGE: www.widgets.com/category/red-widgets [301 Redirect to] NEW PAGE: www.widgets.com/red-widgets

Example 2: Permanent Discontinuing of Products / categories
If you are discontinuing prducts and/or categories then rather than just let Google forget them you should 301 redirect them up a level to pass on any rankability the discontinued page has to an existing page:
www.widgets.com/red-widgets is discontinued so 301 traffic to this page to the parent category www.widgets.com/widgets (or the home page if that’s the next level up).
www.widgets.com/red-widget-product-1 is permanently discontinued so 301 redirect traffic to the parent category: www.widgets.com/red-widgets
WARNING: Do not 301 re-direct an out of stock product. Leave it where it is and mark it out of stock to avoid losing rankings for that product.
Example 3: Non www to www.
This is by far the biggest thing we see that’s missed when launching a new site. If you type in your website without the www, it should redirect to the www version (You can do this the other way around too).
If it doesn’t, essentially, Google sees two versions of your website – and that’s bad.
It’s a bit more complex to ensure this happens as you need to ensure that every page on your website behaves the same. Usually, in the case of Apache servers you need to add a rule into your .htaccess file.
http://httpd.apache.org/docs/2.0/howto/htaccess.html and http://httpd.apache.org/docs/2.0/misc/rewriteguide.html provides further info.
Remember, if you don’t 301 redirect old pages to new, not only will you confuse visitors, you could lose considerably traffic to your website that could take months or even years to recover.