Login



I was talking to some guys in the business the other day about SEO. I told them about this little piece of script I found years ago that shows when Googlebot comes around your site to visit by sending an email to you. I was amazed that these guys had never heard of such a script or tool. I mean doesn’t everybody want to know when Googlebot has paid a little visit to your site?

Anyway, for all of those who don’t use this yet, this is the one I use. Just put it in your header, footer or whatever.

<?php
if ( strpos( $_SERVER['HTTP_USER_AGENT'], ‘Googlebot’ ) !== false )
{
// The email address we want to send the email to
$email_address = ‘YOUREMAIL@EMAIL.COM’;
// Send the email
mail($email_address,’Googlebot Visit’, ‘Googlebot has visited YOURSITE.COM: ‘.$_SERVER['REQUEST_URI']);
}
?>

10 CommentsPost by admin

10 Responses to “Find out when Googlebot visits your page”

  • ark says :

    February 11, 2010 at 1:04 AM

    This is cool. I think I’ll try it. Thanks for sharing.

    Reply
  • coday whizzite says :

    February 27, 2010 at 2:10 AM

    i have no idea what a header or footer is, i have no idea where to put a script

    Reply
  • Christyleh says :

    February 28, 2010 at 6:59 AM

    what good does it get?

    Reply
  • stocazzo says :

    March 1, 2010 at 12:03 AM

    @coday: if you don’t have a footer or a header you can put it in the whatever.

    Reply
  • karan says :

    March 2, 2010 at 8:22 AM

    thanks dude

    Reply
  • GreekPswnio™ says :

    March 4, 2010 at 9:13 AM

    thanks .. Googlebot visits one site more than once a day ??

    Reply
  • moneyonlinerevs says :

    March 7, 2010 at 4:33 PM

    ‘HTTP_USER_AGENT’
    ‘.$_SERVER[‘REQUEST_URI’
    Regarding the items enclosed in ‘xxx’– do we need to specify our server’s name?

    Reply
  • Pekanbaru Riau says :

    March 10, 2010 at 11:10 AM

    I think I’ll try it… thanks…

    Reply
  • Pradeep says :

    September 8, 2010 at 1:25 PM

    This is not a fool proof method. You got to check and confirm by reverse and forward DNS lookup.
    Check googleweb master central for more info.

    Reply
  • Carlos Pinto says :

    June 7, 2011 at 8:31 AM

    lol, you’ll receive thousands of emails if you use the script above.

    Reply
  • Leave a Reply

    Subscribe!

    subscribe by email
    • Recommended


      n