Matt Cutts reaffirmed his distaste for cloaking in his most recent videos over here.  However, I still fail to see a problem with cloaking used ethically, and every time I think of an ethical use I post it on this blog.

Chris Boggs posts here that he implemented load-balancing for a web site via round-robin DNS.  The problem is that this solution yields the same problem as mirroring a site.  And if you think about it, it's basically the same thing — except that the mirror selected is random.  Typically, instead of a user clicking a link to get to the mirror, he is redirected.  In both cases, there are duplicate content issues looming in the background.  Here are the problems:

1. Like mirroring, you will inevitably cause Google to guess which of the sites is the primary site and which are the mirrors.  It may guess incorrectly.  It may also assume you are a spammer.
2.
People will inevitably link to the mirrors — and this dilutes the number of links your site has.  It also makes it even harder for a search engine to determine which site is the primary site.

So what do you do? 

Ideally, you would use some sort of load-balancing appliance to obscure the fact that there are multiple servers.  I know Cisco makes a few of them.  However, I also see no harm in using cloaking to detect Google and make sure it stays at the primary site if it's already there — don't redirect it!  If it does start to crawl a mirror, for whatever reason, redirect it back to www.example.com.  This could be achieved easily using a cloaking library that detects if the user-agent is a spider.  It would then redirect it to the same URL on www.example.com.

With PHP and my cloaking library, it would look something like this:

<?
include('SimpleCloak.php');

if ($confidence SimpleCloak::isSpider()) {     
    if (
$_SERVER['HTTP_HOST'] != 'www.example.com') {
        
header('HTTP/1.1 301 Moved Permanently'); 
        
header('Location: http://www.example.com'); 
        exit();
    }
    
// do not redirect the user if not.
} else { 
    
// some sort of random redirection scheme.

?>

The best solution, I admit, is the load-balancing appliance — but that's a lot more expensive.  The only problem I see with my solution is that users will continue to link to the other versions regardless.  Ideally, this wouldn't happen.  The links would be redirected and probably still count; that is still not ideal, however.  So if you can afford a load-balancing appliance, go for it.

Disclaimer: According to Matt Cutts, this could still get you banned :)  But does anyone else fail to see how cloaking is universally unethical?

Tell an amigo:
  • Sphinn
  • Digg
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Facebook



Related posts:
Cloaking Is Not Evil: Part I This post is an answer to those who have criticized...
Cloaking is Not Evil: Part II Someone commented on my last post that there is a...
The Google Cloaking Hypocrisy I've been digesting this for awhile.  Barry Schwartz of Search...
The Debbie Does New Delhi Of Cloaking Since I got my 10 links, I can now post...
Google Robots.txt Snafu: Part III (Conclusion) We finally have a conclusion on how exactly to interpret...