The Brand New Blog Post Editor Released!

Read more
Mon. - Fri. 9 am - 5 pm Support Policy
Remember me

Unwanted Google Indexing of all images in Gallery!

3 weeks 5 days ago #1

  • Marc's Avatar
  • Marc
  • Posts: 4
Hello All,

I have had quite some difficulty figuring out how to stop search engines (Google) from indexing ALL Gallery images once a website had been launched. In my case most pictures in the gallery are of 'people' and that can be sensitive content.

So for those of you who may actually want to block the indexing of all images I am sharing my solution (while most of you probably want all or most of your (lightbox) images indexed).

The main 'mistake' I made was to not be 'prepared' before submitting my website to Google.

In any case here is my solution for not having image links indexed!

I should have added this in robots.txt BEFORE submitting my website:

Disallow: /*?

This 'disallow' rule should stop Google from indexing all 'links' that have a "?" in it.

And in case you want your gallery page indexed (just the first page which loads with your "Gallery" Menu Button), then you can add this rule Allow: /gallery.html$ (I'm assuming your Gallery menu alias is called "gallery").

Disallow: /*?
Allow: /gallery.html$

The "$" tells Google that nothing comes after the .html

I have more than 5000 pictures in my (Album Mode) gallery, and due to my mistake I had to use Google's Webmaster Tools to try to remove 100-200 images per day, but new images were being indexed anyway even though I desperately added Disallow: /*? and also tried other codes in my robots.txt. Somehow Google continued to add image links.

So for those who were TOO LATE with the robots.txt like me, here is another tip:


Change the alias of tour Gallery Menu Button to something else, like main-gallery and make sure Disallow: /*? is in your robots.txt. Then you can let Google fetch and render main-gallery.html

And to get rid of all the undesired links (mentioned above) in google, in Webmasters Tools submit a directory removal of /gallery - this will successfully remove all indexed links of gallery.html and gallery.html?categorynames etc... the directory removal will look something like this www.yourwebsitename.com/gallery in Webmasters Tools.

I'm curious if this will be helpful for anyone, and if there are further tips and suggestions ;=)

1 week 2 days ago #2

  • M E's Avatar
  • M E
  • Posts: 1
Hi
Your photos is not safe from indexing or viewing just because of a robot.txt file. Not all search engines respect your wishes in the robot.txt file. And Later Google could get the links from those other search engines.

Bad bots might not do as you want:
help.dreamhost.com/hc/en-us/articles/216...piders-and-crawlers-

www.theregister.co.uk/2015/05/19/robotstxt/

Do not use robots.txt to prevent sensitive data (like private user information) from appearing in SERP results. Because other pages may link directly to the page containing private information (thus bypassing the robots.txt directives on your root domain or homepage), it may still get indexed. If you want to block your page from search results, use a different method like password protection or the noindex meta directive.

moz.com/learn/seo/robotstxt
Powered by Kunena Forum