Redirection 301 and 302 and Google

301 and 302 http reply codes indicating redirections are very much different in terms of Google SEO. And did you know Wordpress is always using 302 by default?

Let’s see what the difference is first.

301 :  Moved Permanently. 301 tells you that the current website requested by current URI is moved to a new brand new URI, so you should drop the originally used URI. If you are moving a website to a different domain, this is the way should be done.

302 : Moved Temporarily. 302 tells you that the current redirection is temporary  and you should use the original request URI next time you visit again. If you are temporarily redirecting to a page (site update or special product promotion…), this is it.

Now let’s see How Google sees these redirection codes. If 301 is used, Google will move original request URI’s PageRank to the new destination URI. And eventually remove the request URI. If 302 is used PageRank will be intact to the original website and the original website will also benefit from the destination website’s content.

Many shared webhosting accounts set up both www (ex. http://www.example.com )and top level domain (http://example.com) to point to the same webpage by default. If you use them both website URLs thinking they are the same address, you are mistaken. In fact, you will eventually split the PageRank and pages might be considered as duplicated content.

I had this WordPress website to promote. Let’s say it’s http://www.example.com. I found that when I checked the Search engine status and searched the domain, I domain name was ‘example.com’ instead of ‘www.example.com’.  I just couldn’t understand because I was promoting only using ‘www.example.com’ everywhere , but ‘example.com’ was cached by Google.

But then I remembered that I used ‘example.com’  during the first website development. I setup Google analytic code in the website, and used ‘example.com’ most of the times accessing the website. I think that made the ‘example.com’ as the primary or first URL to Google instead ‘www.example.com’

So I checked the HTTP header (This can be easily done by run curl or wget tool ) and when I used ‘example.com’ , the server replied with 302 code! So that’s why ‘example.com’ still lived in the Google Search Engine.

HTTP/1.1 302 Moved Temporarily
Date: Wed, 23 Sep 2009 12:30:32 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i
X-Powered-By: PHP/5.2.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=c22b7be08ec5f5ee5c9238727b3eec3a; path=/
Location: http://www.example.com/
Content-Length: 0
Content-Type: text/html; charset=UTF-8

I quickly checked the Wordpress PHP files and wp_redirect function’s default redirect code was 302. Solution was to enforce 301 redirection and I found this Permalink Redirect Wordpress Plugin. In fact there are other redirection plugins out there , but this plugin is simple and easy to setup. Just enabled the ‘Hostname Redirect’ check box from the option page and it’s showing 301. Thanks Scott.

I hope this update will resolve the issue with Google search result. When you are thinking of permanent website redirection, make sure you use “301”.

Here are some more reading on 301 and 302 redirections.

http://en.wikipedia.org/wiki/URL_redirection
http://news.stepforth.com/blog/2008/01/redirects-permanent-301-vs-temporary.php
http://www.mattcutts.com/blog/seo-advice-url-canonicalization/
http://www.mattcutts.com/blog/seo-advice-discussing-302-redirects/

Here is an update. From Google Webmaster – Duplicate content and multiple site issues, there was a new introduction of link tag with ‘rel’ attribute that will help to correct and guide Google to move the destination website. Add below tag in the header in between <head> and </head>

<link rel="canonical" href="http://www.example.com"/>
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

Related posts:

  1. Top 5 Wordpress Plug-in for Internet Marketing – Google XML Sitemaps
  2. Fantastico WordPress Installation and Wordpress Privacy Settings
  3. Google AdWords Creates Niche Magnet

Leave a Reply

My favorite listmania

Affiliate Managers Must Reads

Successful Affiliate Marketing for Merchants
Review by James E. Dorans (5 out of 5) - If you become or need to learn how to manage an affiliate program this is the book to get.
A Practical Guide to Affiliate Marketing: Quick Reference for Affiliate Managers & Merchants
Review by GN (5 out of 5) - A little more than a year ago, I had little-to-no knowledge about affiliate marketing. There seemed to be a lot of opportunity in this space, especially with technology companies who serve the perform...
What Sticks: Why Most Advertising Fails and How to Guarantee Yours Succeeds
Review by marketingandmediareviews (4 out of 5) - Rex Briggs and Greg Stuart performed an amazing amount of research on media mix management with Fortune 500 advertisers and over a billion in media spending.

The authors are hell-bent on ...
Purple Cow: Transform Your Business by Being Remarkable
Review by LisaB (5 out of 5) - For the first time in my life I bought 2 used books today from Amazon and they were in great condition! Like new!
Getting Things Done: The Art of Stress-Free Productivity
Review by Rebecca L. Williams (5 out of 5) - This book fills in the gaps that I have found missing in the past. It has a specific "how to" to implement the process into my life. Great book!
Ready for Anything: 52 Productivity Principles for Work and Life
Review by Martin Gollery (4 out of 5) - David Allen is back with an add-on to the popular book, "Getting Things Done". I prefer this one, simply because it has less jargon and gives you something to work on every week. Still, I think that m...
The Super Affiliate Handbook: How I Made $436,797 in One Year Selling Other People's Stuff Online
Review by HealingDr1 (3 out of 5) - I got this book and "Make a Fortune Promoting Other People's Stuff Online: How Affiliate Marketing Can Make You Rich" from my local library. They are the same book with different titles! Save yourse...
Street Smart Internet Marketing - Tips, Tools, Tactics & Techniques to Market Your Product, Service, Business or Ideas Online
Review by K. Conner (3 out of 5) - Since I started a job working on a web site, I thought I'd need this information.

I haven't read the whole thing and it's probably best if you browse it and don't start from the beginnin...
Don't Make Me Think: A Common Sense Approach to Web Usability, 2nd Edition
Review by Usama Qasem (5 out of 5) - Do I like the book?
Yes, an easy to read and simple book with easy to learn methods.

Do I recommend you to read this book?
Yes, if you are a beginner in web usability looking ...
Waiting for Your Cat to Bark?: Persuading Customers When They Ignore Marketing
Review by Bill Liao (5 out of 5) - People love to click things and they hate it when when they click does not aid them in getting what THEY want. In waiting for you cat to bark you will gain a deep isight into why traditional marketing...
Call to Action: Secret Formulas to Improve Online Results
Review by Rolf Dobelli (5 out of 5) - Over time, humankind has perfected a set of bedrock sales principles that work well in most circumstances: know your product, outdo the competition, work harder than the next person, and so on. Unfort...
The Long Tail: Why the Future of Business is Selling Less of More
Review by Daniel8848 (5 out of 5) - I'm not a newcomer to technology. I spend hours a day on the web so I canceled my newspaper subscription after 30 years, my girlfriend and I get our music online, shop online, we stream Netflix and ot...
The Search: How Google and Its Rivals Rewrote the Rules of Business and Transformed Our Culture
Review by petesea (2 out of 5) - So, maybe reading this book 5 years ago would have been very informative. By now, we all know Google well and also the story of how it came into being. I wanted more information on their advertising...
Web Search Garage
Review by Rickesh Pal (1 out of 5) - I bought this book reading the reviews on Amazon.com. When I got it, I was sorely disappointed. The author has a bit of an arrogance about her which comes through in the pages, which is fine, but then...
Google Power: Unleash the Full Potential of Google
Review by Carsten Cumbrowski (4 out of 5) - The book is a bit outdated, but there is nothing anybody can do about it. By the time a book is written, edited, published and finally available for purchase at your local book store did pass so much ...
The Extreme Searcher's Internet Handbook: A Guide for the Serious Searcher
Review by Jerry Saperstein (5 out of 5) - Randolph Hock is into his third edition of "The Extreme Searcher's Internet Handbook". This is one of those gems that should be on the bookshelf, if not the desk, of every who uses the internet to sea...
Web Analytics Demystified: A Marketer's Guide to Understanding How Your Web Site Affects Your Business
Review by Michael T. Mayfield (4 out of 5) - This book has a lot of fluff but when I had completed it I had a few really good take aways.
Marketing Metrics: 50+ Metrics Every Executive Should Master
Review by Midwest Book Review (5 out of 5) - Objectivity is something hard to find, even in numbers. "Marketing Metrics: The Definitive Guide to Measuring Marketing Performance" is a guide to understanding the many measures of success in today's...
The AdSense Code: What Google Never Told You About Making Money with AdSense
Review by JBee (4 out of 5) - I read the excellent reviews about the Adsense Code and decided to buy the book based on those reviews. While I've found the book useful I've also found it a bit hard work as:
a. It assumes a de...
Pay-Per-Click Search Engine Marketing Handbook: Low Cost Strategies for Attracting New Customers Using Google, MSN, Yahoo & Other Search Engines
Review by Stephen Ashley (5 out of 5) - This was one of the few books I've read that I can say clearly increased my income and saved my company a LOT of money that we had been wasting without realizing it.

Once I read this boo...
Winning Results with Google AdWords
Review by jimbo (2 out of 5) - This book was well written for its time but Google no longer uses the formulas found in this book. Any book written before August 2005 should be considered out of date at this point. At that time Go...
The ABC of SEO
Review by Sandy Gilley (2 out of 5) - If you are looking for a book that is a Dictionary for SEO terms then this book is for you.
Spam Wars: Our Last Best Chance to Defeat Spammers, Scammers & Hackers
Review by Richard Somplatsky (4 out of 5) - In today's age, it is incredible how many companies still put employees' names and e-mail addresses on their websites. This data is vulnerable to extraction by "robots" that then put this information...
Search Engine Optimization: Your Visual Blueprint for Effective Internet Marketing
Review by Marty Wolff (5 out of 5) - With the incredible amount of so called information on this topic and all things internet, very confusing at times, I was able to implement some tactics I learned from this book immediately. This form...
Radically Transparent: Monitoring and Managing Reputations Online
Review by Kathryn Welds (3 out of 5) - If you're looking for a comprehensive overview of the Web 2.0 world, to manage your business brand and/or your personal brand, Radically Transparent is a good introduction. However, if you are knowled...
Landing Page Optimization: The Definitive Guide to Testing and Tuning for Conversions
Review by Sangil (2 out of 5) - I found this book more helpful for big corporations and did nothing for me as a small business owner. I felt the writing style was PHD level and should have been written for the masses. It went into t...