Please share :

Cloacking is black hat (spamdexing) SEO Technique. In This technique we built versions(view) of same page, one for search engine and other is for real visitors. There are various techniques for Cloaking.

Different Cloaking Methods

  • IP address Cloaking
  • User-Agent Cloaking
  • HTTP_REFERER Header Cloaking
  • JavaScript Cloaking

IP address Cloaking –

This method is based on IP address of search engines. you can place following code in your website for cloaking purpose.

PHP code of Cloaking

Example  of cloaking in php

// replace ip address with real ip address 132.132.132.32

<?php

if ($_SERVER[‘REMOTE_ADDR’] == ‘IP address here’) {

echo “Shows normal version of page “;

} else {

echo “After Cloaking effect “;

} ?>

// ———————- —-        or use following code for multiple IP address

<?php
$arrayofip = array(“ip1”,”ip2”,”ip3”);

if (in_array($_SERVER[‘REMOTE_ADDR’],$arrayofip)) {

echo “Normal View”;

} else {

echo “After Cloaking effect”;

} ?>

// ———————– where to find IP address

www.iplists.com/

www.iplists.com/nw/google.txt

You can also use above code in wordpress 

User-Agent Cloaking –

Cloaking on the User Agent consists of performing a specific action based on the user agent of the visitor.

<?php

$ua = $_SERVER[‘HTTP_USER_AGENT’];
$uaGoogle=”Googlebot/2.1 (+http://www.google.com/bot.html)”;

if($ua==$uaGoogle){
print(“this is for search engine Google Bot”);
}else{
print(“This is for visitors”);
}
?>

 

HTTP_REFERER Header Cloaking –

Some black hat cloak according to the keywords entered in the search engines. Thus it is possible to sell motor traffic via SEO as the sponsored link!

PHP Script for HTTP Ref

<?php

$referer = $_SERVER[‘HTTP_REFERER’];
$refererSite=”http://epsinfotech.net/example”;

if($referer==$refererSite){
print(“Hi visitor who comes from the site”;

print ($refererSite);
}else{
print(“this is for visitor”);
}
?>

JavaScript Cloaking –

users with JavaScript enabled browsers are shown one version while users with JavaScript turned off (like search engines) are shown another version of a website.

 


Google guide lines for cloaking 

Be careful, do not believe that after reading this article, you will be able to cloaker everything and anything without risk. Black hat Technique because its violate basic search engine guideline of serving quality content to user. It is not advisable to apply cloaking on any website. It is right that if you use cloaking in the wrong way, with wrong purpose , Google and other search engines may remove you from their index, and may be you find penalty from search engines.

 

Please share :
Author

1 comment

Leave a Reply