I'm looking for the SEO way to tell Google not to download pictures.

I have a script that generates one of two things based on who accesses the site:

If an unauthorized robot accesses the site, they will receive a message that they should visit the website first.

Users on the other hand who have seen the site first will cause the script to generate the picture for them.

I already have this header:

X-Robots-Tag: noindex, noimageindex

But I'm not too sure what status code I should hand to robots (who receive the message instead of the picture). Right now, I set it to 200 to denote a valid page. I was thinking of setting it to 401, but I don't know if that's correct in this case.

  • 1
    I used to 301 the bots to a porn site... What??... Not what you are looking for? ;-)
    – closetnoc
    Jan 2, 2016 at 16:53
  • I'm trying to impress google here Jan 2, 2016 at 18:13
  • Cash works for me... the greener the better... I do not have an answer for you, but I will think about it and will let you know if something comes to mind.
    – closetnoc
    Jan 2, 2016 at 18:18
  • "no right to access the download" - my first thought is a "403 Forbidden".What resource is being requested - that is being blocked? Are you saying the same script serves "a message" when the user is not authorised and a "picture" if they are?
    – MrWhite
    Jan 3, 2016 at 1:05
  • 1
    The bigger question is why are you serving different content to search engines and users? Jan 3, 2016 at 16:50

3 Answers 3


to tell google not to download pictures

If i understand you correctly, you don't want, that images appear in the image search? If yes, then publish such images like data uri and they will be not indexed.


Blocking the directories with images using robots.txt is one way, but google crawls as a human ne so blocking images etc impacts how google sees your site.


I think you should not show two different things to bots and users. Instead, just don't allow google image bot to index your site.

You should place this in your robots.txt

User-agent: Googlebot-Image
Disallow: / 

Source: https://support.google.com/webmasters/answer/35308?hl=en

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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