Showing posts with label Cloaking. Show all posts
Showing posts with label Cloaking. Show all posts

Diferent types of cloaking

Remember that cloaking is to hide change dynamically the web content for human user and robots, so you can show an HTML content to a bot and images or flash content to humans, we talk about in this post.

There are different types of cloaking, 

  • User.agent cloaking, 

    web sites that use this technique, identify the visit by the user agent field in the HTTP request, for example, you can identify a human visitor is you can see user browser information, bot's don't use internet browsers :-), with that easy php code you can identify the information of the user agent
    <?php
    echo $_SERVER['HTTP_USER_AGENT'];
    ?>
  • To identify a bot, you must use a code like this:

      if ( strstr( strtolower( $_SERVER['HTTP_USER_AGENT'] ), 'googlebot') )
          {
          // code to execute for bot's
          }

    Examples to use, remember that google checks will penalty you if they detect it.
    - Change image content to HTML content.
    - Redirect bots or humans to a different  pages.
    - etc...

  • IP based cloaking, 

    This different technique of cloaking is quick similar to the user agent but rather than check is the visitor is human or search engine bot, you can read the IP of your visit and change the behavior of your site, to detect the IP of your visitor in php you can use the next script:

    <?php 
    $ip = $_SERVER['REMOTE_ADDR'];
    ?>
    or
    <?php 
    $ip =  or $_SERVER['REMOTE_HOST']
    ?>

        Examples to use, this is not so bad as user-agent.
        - This is more common for geolocate sites, you can redirect your visitor to the correct language if   
           you can geo locate his IP.
        - You can apply IP filtering for develop testers, while you are developing a web site, maybe you    
           would like to avoid some controls in the ip that you are using.
        - You can identify the IP of your visit, search in your user database if is a returning visitor and you
           can show additional information based of the last visit information...
  • HTTP language header cloaking,

You can get this information using JavaScript or PHP, it is a property of the user loaded document, but not of its parent.

JavaScript example:

<script type='text/javascript'>
document.write(document.referrer);
</script>

PHP example:

<?php echo $_SERVER["HTTP_REFERER"]; ?>


        Other code  Example:

        <?php
            $langu = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
            $acceptLang = ['de', 'es', 'en']; 
            $langu = in_array($langu, $acceptLang) ? $langu : 'jp';
            require_once "index{$langu }.php"; 
        ?>

        This header is a trick to use when while using the server has any option to determine the language         trough another way, like using specific URL and/or IP, that is chosen by an explicit decision of                 the user.

              • JavaScript cloaking, 

                It's not very different from that last examples explained before, remember that JavaScript is used as a client side, so after the server send all the http request and display the html to the user, you can apply there any JavaScript routines to  manipulate the content based on how your human visitor do in the website.

                For example you can redirect the user reading the client information using javascript, there you have more options but you are more vulnerable if the user have javascript block or hacks.
              <A HREF="YourAffiliateSiteUrl" onMouseOver="func_changeurl('v_code'); return true" onMouseOut="window.status=' '; return true">Link Title</a>
                      Whit that code, you can change your affiliates links once your human visitor click on it, you can do         the same using php and it's better and secure.



              Cloaking

              Lest go to talk about a BlackSeo topic, now is time of one of the most banned BlackSeo activities by different searcher engines.  
               
              Cloaking means:
              Show different HTML content to users and another one different to search engine.
               
              For example: 
              • A text page will be loaded for search engines and a flash site to users.
              • Show a different content to users with JavaScript activated and another content to non-JavaScript users (usually robots).
              • Show some affiliates links to yours partners that are from a specific country and another different to user in local country.
               
              The Cloaking was a very practical use years ago by many webmasters whose clients wanted a website designed completely in flash as a solution to allow search engines to understand a flash site, but now a days that's changing as the use of flash in not popular.
              Flash was one of the most important technological advances in the field of web design (I

              don't think so), was developed by FutureWave Software Company in 1994 under the name of Future Splash Animator.

              Starting in 2010, Flash comes into open warfare with Apple and its use began to decline.


              Our goal as a White SEO is allow you to reach all your pages just by clicking regular links, and your site should be pretty crawlable beside use flays style design, but remember that this is also banned by search engines.

              On that link you will see a good explanation:
              link

              Script to cloaking content:
              Show content for javascript disable on Internet Browser:

              <noscript>Your content for Javascript disabled browsers and bots here</noscript>

              PHP cloaking:
              Redirect to specific site reading country code url parameter.

              <?php
              $var=$_GET['cc'];
              header('Location:
              http://www.othersite.com/m-xx.cfm?var='.$cc);
              ?>

              How to test your site cloaked:
              For Example on firefox width
              User Agent Switcher or spider the site yourself with wget and specify an user agent with -U parameter.  
              Related:
              Unnatural Link
              http://cognitiveseo.com/blog/4224/unnatural-links-definition-examples/
               
              What Google think about Cloaking:
              http://www.seolium.com/seo/learn/google-about-cloaking/
               
              Source:
              http://en.wikipedia.org/wiki/Cloaking