Today I noticed that a few Google advertisements in an adsence block on one of my pages were trying to display a file called “/pagead/badge/checkout_999999.gif” from my server. I did a bit of investigating and found out that the companies behind these adverts use Google Checkout and “checkout_999999.gif” is supposed to be a tiny shopping kart icon with a tooltip which reads “This site accepts Google Checkout”.
My problem is that “/pagead/badge/checkout_999999.gif” doesn’t exist on my server. What do you do to handle this on your website? e.g:
- Save the logo (
) on your server in the place it is expected by Google? - Use a mod_rewrite rule to redirect the request? To where though?
- Find a adsense option to turn off Google checkout enabled adverts? (I looked but couldn’t see one?)
- Ignore the issue and get on with something important
Back-story – please ignore unless very bored: Page 2 of the search page on our site suddenly stopped working and I didn’t know why. It turned out to be related to Google adsense. We use PHP session variables to save search criteria over different pages which worked fine for a while but then randomly stopped working. Random bugs are the worst! I was trying to work out what else is random on the page and decided that the Google ads were the only other random thing. Sure enough, sometimes a particular advert seemed to clear the session variables and break the search. What was actually happening was that the advert was requesting a image from our server (“checkout_999999.gif“) which didn’t exist and Apache was behind-the-scenes redirecting to the site homepage which unfortunately clears the session variables needed for the search – hence the non-obvious breakage. I’m a bit worried that Google ads can request random files from my sever? I’d prefer if they could only use absolute URL’s if they want to include logo’s or other media.
After playing around with Apache
mod_rewritefor a while I have found a rule that seems to fix my Google Adsense issue:The problem is I’m not sure how to stop a similar thing happening in the future if Google decides to hotlink to a different file?