Search code examples
htmlcssweb-crawler

How to stop google or any search engine indexing the site images?


How can I stop crawlers such Google crawlers or any search engine crawlers to not index the images from a particular web page?


Solution

  • To prevent images from your site appearing in Google's image search results, add a robots.txt file to the root of the server that blocks the image.

    For example, if you want Google to exclude the dogs.jpg image that appears on your site at www.yoursite.com/images/dogs.jpg, add the following to your robots.txt file:

    User-agent: Googlebot-Image Disallow: /images/dogs.jpg

    The next time Google crawls your site, we'll see this directive and drop your image from our search results.

    To remove all the images on your site from our index, place the following robots.txt file in your server root:

    User-agent: Googlebot-Image Disallow: /

    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=35308

    first link on google

    You can use a wildcard character to cover every crawler:

    User-agent: *
    

    However, there's no guarantee that an arbitrary crawler will honor this file at all.