I am having trouble with a few image files that I would like to block for Google Image search. I am using Yoast SEO Plugin, which allows me to directly edit the robots.txt file.
A few people with portrait images on the site requested not to appear in image search, so we added entries like the following:
User-Agent: Googlebot-Image
Disallow: /wp-content/uploads/2019/03/domain.eu-adam.png
Disallow: /wp-content/uploads/2020/02/domain.eu-team-eve.jpg
Some time later, we noticed that this is not working anymore, as the images started to reappear on Images results. This may in part be caused by new photos being used with different filenames, but even after updating the file again, deleting the older image files, and giving the Google Indexer some time, Google displays the images. (latest robots.txt update was in May)
Opening domain.eu/robots.txt displays the latest version. Is there some kind of Google or WordPress magic that I am missing?
I am having trouble with a few image files that I would like to block for Google Image search. I am using Yoast SEO Plugin, which allows me to directly edit the robots.txt file.
A few people with portrait images on the site requested not to appear in image search, so we added entries like the following:
User-Agent: Googlebot-Image
Disallow: /wp-content/uploads/2019/03/domain.eu-adam.png
Disallow: /wp-content/uploads/2020/02/domain.eu-team-eve.jpg
Some time later, we noticed that this is not working anymore, as the images started to reappear on Images results. This may in part be caused by new photos being used with different filenames, but even after updating the file again, deleting the older image files, and giving the Google Indexer some time, Google displays the images. (latest robots.txt update was in May)
Opening domain.eu/robots.txt displays the latest version. Is there some kind of Google or WordPress magic that I am missing?
Share Improve this question edited Jun 24, 2020 at 7:02 danschdev asked Jun 23, 2020 at 12:37 danschdevdanschdev 114 bronze badges1 Answer
Reset to default 0This took the index some more time, but after around six weeks, the blocked images are no longer displayed as search results.
I am not sure if this will help for future uploads for photos of the same people with different filenames, but I had added strings with placeholders like these:
User-Agent: Googlebot-Image
Disallow: /wp-content/uploads/*adam*smith*.jpg
Disallow: /wp-content/uploads/*adam*smith*.png
Disallow: /wp-content/uploads/*eve*miller*.jpg
Disallow: /wp-content/uploads/*eve*miller*.png
Disallow: /wp-content/uploads/2019/03/domain.eu-adam-smith.png
Disallow: /wp-content/uploads/2020/02/domain.eu-team-eve-miller.jpg