tommytx Posted July 23, 2012 Share Posted July 23, 2012 Is there someplace on the server where I can grab the status code each time google hits my site? For example when I set up a new site or even transfer one site to a new one, I monitor the crawl to make sure if something goes wrong I can fix it without waiting for a thousand 404 errors in my google toolbox. So I log each google visit... but what I would like to do is check the status code that google received like a 200 or 404 or 301 forward and etc.. that way I could add the code right along with the page visit and each hour i could monitor to see if the crawl is going well.. or is going bad... I know that it is logged into the awstats, but I want to dynamically capture it on the server at the same time I capture the page and ip of the google bot. Does anyone have any idea how this might be done.. Below shows an example of what I want to do.. 66.249.73.215 Sunday, 22 July 2012 09:23 pm Refer: UserAgent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) ReqFile: /idx/?idx-q-Cities=Montclair+Twp.&idx-q-PriceMax=2000000&idx-q-PriceMin=1500000&idx-q-PropertyTypes=1547 Status:200 as you can see I have the url as Requested file... but it would be much better if I could get the status code like 200 or 404 etc.. You see the Status:200 I don't know how to get dynamically... This way if I see a lot of errors popping up i can fix the rest of them before google finds them... for example when using short code... Link to comment https://forums.phpfreaks.com/topic/266099-how-to-log-the-status-of-the-request-from-google/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.