Currently I have it where google isn't supposed to index images on my site, and for every image request, regardless of who initiates it, the HTTP response header contains:

X-Robots-Tag: noindex, noimageindex

Yet, according to my server logs, the entire image contents are still served.

Because I don't want the image to be indexed in search engines, is it acceptable to deliberately strip all headers except for the date and the x-robots-tag header and only send that to google with nothing else?

I just don't want google to suck up tons of unnecessary bandwidth, and at the same time, I don't want to be flagged by google for making cloaking happen.

  • robots.txt prevents crawling and usually it prevents indexing too. If you don't want it crawled, I would recommend using robots.txt rather than the X-Robots-Tag header. – Stephen Ostermiller Jul 8 '16 at 0:37

The Google terms specifically state that no form of cloaking is allowed and Google defines cloaking as serving anything different to Google than to the end users. If you are concerned about bandwidth that much then the only option would be to define a rule in your .htaccess file which returns a 403 forbidden header for the index page and each image in the directory when the user agent matches Googlebot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.