Click here to Skip to main content
13,198,325 members (69,784 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


25 bookmarked
Posted 9 Sep 2006

How to be notified if a website is crawled by Google?

, 9 Sep 2006
Rate this:
Please Sign up or sign in to vote.
This article explains a code snippet on how to receive a notification when Google hits a website.


It was always a question to me how to be notified when a search engine robot like Google's reaches a website. On the other hand, I was wondering about receiving a notification as soon as Google explores my website.

I spent sometime on Google and searched the internet to see if I could find a trick or technique to employ to receive a notification once my website is hit by Google itself. The question is not why it is important to know when a website is crawled by Google, but how to achieve this goal?!

Code Snippet

First of all, please don't expect this article to describe an algorithm or a lengthy sample code. This is only a small but useful technique. I ran into the following PHP code snippet in PHP on a weblog somewhere on the internet:

if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) !== false )
    // The email address we want to send the email to
    $email_address = '';

    mail($emai_address,'Google bot','The website is hit by google now.',

In the body of the above 'if' statement, an email is sent to once the website is hit by Google. We can even send a notification to cell phones too if Google reaches a website. All we need is to substitute the code inside the 'if' block with a instructions to trigger an SMS to a cell phone via web, as it is described in this weblog.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Alex Douma
Web Developer
Canada Canada
- B.S. degree in Computer Engineering.
- 10+ years experience in Turbo C, Borland C , Visual C++ and Managed C++.
- Obssessed in OOP style design and programming.
- Desigining and developing Network security tools.
- Desigining and developing a client/server appliation for sharing files among users in a way other than FTP protocol.
- Desigining and developing ISP Subscribers account management by binding to Cisco tools (NtTac+), Reporting the results on the web by ISAPI method.
- Designing and writing code to build a search engine (Web crawler) by SQL Server 7.0 and VC++.

- On-board programming of non-boundary scan memory devices like flash memories by boundary scan (IEEE 1149.1) protocol in C# and J#.

- Designing and implementing GSM gateway applications and bulk messaging.

The summary of my skills:
C#, J#, Managed C++ code, VC++, MFC, Turbo Pascal, PL/I, SQL Server, MS Access, Windows NT administration, Web site developing, Macromedia tools, Webmastering, Cisco Routers.

You may also be interested in...

Comments and Discussions

Questionsyntactical error Pin
gladiatron20-Oct-11 22:21
membergladiatron20-Oct-11 22:21 
AnswerRe: syntactical error Pin
Coreinsanity23-Feb-13 3:44
memberCoreinsanity23-Feb-13 3:44 
GeneralRe: syntactical error Pin
Aman.A11-Mar-13 23:40
memberAman.A11-Mar-13 23:40 
QuestionNice Info Pin
stixoffire15-Jun-09 19:40
memberstixoffire15-Jun-09 19:40 
Questionhow to achive in c# Pin
cb mehta25-Aug-07 0:48
membercb mehta25-Aug-07 0:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171020.1 | Last Updated 9 Sep 2006
Article Copyright 2006 by Alex Douma
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid