I logged a google crawler request in my asp.net application and this is what the Google crawler signature looks like.
IP request : 66.249.71.113
Client : Mozilla / 5.0 (compatible; Googlebot / 2.1; + http://www.google.com/bot.html )
My logs track many different IP addresses for a Google crawler in the range 66.249.71.* . All of these IP addresses are located in a geographic area in Mountain View, CA, USA.
A good solution is to check if the request comes from a Google crawler, to check that the request contains Googlebot and http://www.google.com/bot.html . As I said, there are many IP addresses that are observed on the same requesting client, I would not recommend checking IP addresses. And maybe when the customer ID comes into the picture. Therefore, go on to verify client identification.
Here is a sample code in C #.
if (Request.UserAgent.ToLower().Contains("googlebot") || Request.UserAgent.ToLower().Contains("google.com/bot.html")) { //Yes, it google bot. } else { //No, it something else. }
It is important to note that any HTTP client can easily fake this.
source share