301/302 Redirects: Understanding and Directing the Crawlers Part 3

January 27, 2010  |   Internal Architecture   |   0 Comment

Welcome to part 3 of the Understanding & Directing the Crawlers series. We’re going to discuss 301 & 302 redirects.  301/302 Redirects are used to either change the URL or retire an existing page with an updated page.

  • 301 redirect – Should be used if you PERMANENTLY move a page (i.e. you transfer the content from one existing page to either a different existing page or a newly created page that would be better suited to host that content)
  • 302 redirect – Should be used if you TEMPORARILY move a page (i.e. you transfer the content from one existing page to either a different existing page or a newly created page, but maybe you’re unsure of where the final destination of the content will be)
  • So let’s take a look at how to actually do this.

    1. A .htaccess file is required to do a redirect.  It’s a file similar to robots.txt that sits on your server in which you can write your redirect instructions in there.
    2. If you already have a .htaccess file, the redirect instructions will go at the bottom of the file past all of the existing coding
    3. If you don’t have a .htaccess file, not to worry, creating one is simple.  Open up a text file and name it “.htaccess”
    4. The redirect instructions should look like this

    redirect 301 /inventory/product.html http://www.example.com/inventory/product1.html

    redirect 302 /inventory/product.html http://www.example.com/inventory/product1.html

    FYI – /inventory/product.html (the file you want redirected) http://www.example.com/inventory/product1.html (the URL you want redirected to)

    Hope this helps!  Stay tuned for content barriers next!





    About the author


    Maximus Kang is the Director of SEO Strategy & Founder of Ranking Channel, a Seattle-based SEO consulting agency. With enterprise level experience at Expedia and agency experience at Optify, his SEO knowledge covers a wide spectrum. He also started his very . Follow him on Twitter or connect with him on Facebook.

    New to SEO? You can learn How to Win Users & Influence Google.