Mobile app version of vmapp.org
Login or Join
Jamie184

: Is it safe to redirect to ajax enabled content if its not google bot visiting? At a webshop I'm currently working on I have several links that show a fancybox with product information. The

@Jamie184

Posted in: #Blackhat #Php #Seo

At a webshop I'm currently working on I have several links that show a fancybox with product information.

The link works without ajax, it shows the same content as the fancybox links etc will not work.

My question is this, is it considered bad/blackhat to redirect everyone except googlebot back to the page showing the link with a parameter that calls up the fancybox.

eg:

if (($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") && !preg_match("#(google|slurp@inktomi|yahoo! slurp|msnbot)#si", $_SERVER['HTTP_USER_AGENT'])) {

header("HTTP/1.1 302 Found");
header("location: " . conf("url:site")."index.php?menu_id=".$_GET['menu_id']."&idproduct=".$_GET['idproduct']."&idlist=".$_GET['idlist']."&fb=1");
die();
}

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Jamie184

2 Comments

Sorted by latest first Latest Oldest Best

 

@Gail5422790

Anything that you do specifically for the GoogleBot user agent that is different from regular users even if it's not intended to be malicious falls into the realm of cloaking as far as Google is concerned. A better alternative would be to redirect based on the use of JavaScript, IE see if the user has JavaScript enabled and if yes then send them to the JS version if no send then to the non-JS version. Because you are treating all users the same (a regular user without JS enable would be redirected just like GoogleBot is) that meets the quality guidelines.

Obviously this technique can be used by spammers as well so it's best to only use it if there isn't another option. But if you have to go that route remember that Google wants GoogleBot treated like any other user (if it gets different treatment they get cranky).

10% popularity Vote Up Vote Down


 

@Angie530

Google recommends the following in its Webmaster Guidelines:


Don't deceive your users or present
different content to search engines
than you display to users, which is
commonly referred to as "cloaking."


Instead of giving users a hard link to the AJAX data provider script, why not just provide the index.php link by default and use Javascript to enhance the link (i.e. by changing its click event to use your AJAX function call instead of directing the user to the index.php link) as the DOM loads?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme