Home SEO Protect Your Photos From Search Engines

Protect Your Photos From Search Engines

written by the strategic mama May 10, 2016

If you’ve been wondering how to keep Google and the other SEs from indexing every bloody thing on your site, especially your images, this post is for you.

When one of my fav bloggers, Jessica, from MommyHoodNextRight, mentioned not wanting Google to index her images, I went to work searching for the perfect plugin.

It doesn’t exist. Well, no free one as far as I can tell. i tried a few on one of my subdomains and they just slowed things down.

But there is still a semi-simple way to stop Google or any SE from indexing your images.

I use this tactic to keep search engines out of my plugins folders. Seriously. I hadn’t originally realized SEs were indexing everything, I always thought it was just my posts and pictures and outbound links. Then I learned better. Keeping the SEs out of your plugins folder is something every self hosted blogger on WordPress should implement. And I used something as simple as …

A robots.txt file.

The Robots.txt is used to tell search engine crawlers which URLs it should NOT request when crawling a Web site. Most search engine crawlers usually look for this file and follow the instructions in it.

I created one when I moved to WordPress Self Hosting and have been updating it every now and then depending on what search engine spam bots I came across and wanted to block from my blog.

Then a few months ago I removed a plugin and within days I had 100 crawl errors because the urls for those plugins had been indexed by Google and now the urls were considered broken links. Bitch slapped my alexa.

Not wanting to go through the hassle of redirecting links for something as silly as that ever again, I snooped around the www and found that I could block SEs from just about anywhere on my site that I wanted to using my robots.txt file.

Here’s what my robots.txt file looks like:

You can definitely use it for you photos, but the first thing that came to my mind was using a plugin because frankly not everyone likes playing in their host’s cpanel and if done incorrectly you could block search engines from indexing your entire site. But don’t be afraid. With a bit of patience and the instructions below you can get it done.

Since I didn’t find a plugin I liked, I’m going to share how you can semi-easily do this. The upside is, it’s not another plugin to bog down your site.

Creating the robots.txt file

Step 1

Locate where your photos are residing. This is as simple as clicking on one of your published pictures and grabbing the link: http://afterbedtimeblog.com/wp-content/uploads//Fotolia_38861998_Subscription_XL.png

this shows that my photo Fotolia_38861998_Subscription_XL.png resides in this folder: /wp-content/uploads/

Step 2

Now this is super easy.

I came across this site when I was searching for plugins.

http://www.mcanerin.com/EN/search-engine/robots-txt.asp

Also this site has a great section called “Why do I want a Robots.txt?” Be sure to check it out.

Again, super easy but I’ve included screenshots so you can see exactly:

Step 3

As the site says “Now, copy and paste this text into a blank text file called “robots.txt” (don’t forget the “s” on the end of “robots”) and put it in your root directory. Like all other files on your server, make sure its permissions are set so that visitors (such as search engines) can read it.”

So you’ll basically sign into your host panel, go to the File Manager and upload this file.

You can also create this file from within your File Manager by clicking New pasting the info in and saving as robots.txt.

SiteMap Plugin Precaution:

If you’re using a sitemap plugin:

have it write these Sitemap files:

Write a normal XML file (your filename)
Write a gzipped file (your filename + .gz)

and if your sitemap plugin gives you this option:
Add sitemap URL to the virtual robots.txt file. Turn it off.

I use the Google XML Sitemaps v3 for qTranslate plugin to create my sitemaps.

Including a sitemap url in your robots.txt file will inform search engine crawlers about URLs that you want it to crawl. Most spiders follow whatever the robots.txt file tells it to do.

I can’t guarantee you this tactic will affect all photos already indexed. However it will stop future photos from being indexed by search engines that honor the robots.txt file.

As of this writing, none of the back-end files I disallowed crawling of can be found in the search engine results.

And that’s it!

photocredit: composite of © yuriy – Fotolia.com and © higyou – Fotolia.com

Facebook Comments
Shares

You may also like

17 comments

Lisa May 10, 2012 at 7:51 pm

Vanita, why would one not want it searchable? My curious mind wants to know 🙂 Thanks. and you sure are right about NOT messing in the ugly cPanel. Not my favorite place either, thought it is good to know.

Reply
Vanita May 10, 2012 at 10:35 pm

Jessica shares her beautiful and creative photography of her children so she asked on my other blog how to keep google from finding those images. Also, if you’re getting hits just for images, then your bounce rate will go up which can hurt your SERP and alexa rankings. if you’re titling the photos based on keywords in your post, then it can help you rank for those keywords. stripping out the meta data from stock photos (which is usually pretty descriptive of the image) helps too. but if you’re using words that describe the image, visitors may just be dropping by to grab that image. their visit won’t last long and your bounce rate will increase. it’s nice to see that you have lots of traffic. i just believe it’s better to know how much of that traffic is targeted traffic.

Reply
Mayura May 10, 2012 at 8:35 pm

That’s cool and easy to use 😉

I’ve known how to edit robots.txt manually and Google Webmaster Tools helps generate them easily too. But this one has far more options. I did it for my friends as they don’t need to crawl their images on their website by Google as they start to appear on Google Image search and anyone can easily save it to their hard drive. However unless they have sensitive information, the reason would be we just love them and don’t want others to have them 😉 You know what I mean – prohibit re-sharing.

However once we published on web, re-sharing starts eventhough we happy or not. When it comes to copying content, blocking site is just a one step for prevention. There are more ways to get them done.

Really informative article Vanita 🙂 I like the robot.txt generator.

Cheers…

Reply
Vanita May 10, 2012 at 10:30 pm

Mayura, keep in mind, using the robots.txt file doesn’t protect your files from being copied/downloaded/stolen, etc. it just keeps it from being indexed. this way people won’t visit your site just for the images. there are plugins to block downloading, but there’s no point considering there are multiple ways to capture a screenshot.

Reply
Mayura May 11, 2012 at 1:01 pm

Ohw yeppy dear… I get it what you mean 🙂 It’s about indexing, yeah… My friends were interested in not showing their images on Google images search. They were websites and blogs with images all over the pages with quotes, funny and you know that kind of stuff. May be am just derived from topic but that’s what I meant 😉

Cheers…

Reply
Ann May 10, 2012 at 8:37 pm

This is awesome free/valuable info for protecting images!!! Thanks Vanita! One little question… I do get a lot of image searches on my site but haven’t thus far been concerned. If I was to implement this would it hurt my SEO? I assume it would hurt my hit rate…

Reply
Vanita May 10, 2012 at 10:20 pm

Ann, take a look at your web master tools. if you find those searches are leading to ppl sticking around to be a reader, than don’t block it. but if you find it’s causing your bounce rate to be high, you can either block it with the robots.txt file or change the name of the file before uploading so it’s not something that contains keywords. i use WP Smush it! to strip meta data from the files (especially with stock images you’ll find photos carry extra info within the file that you don’t see unless you open the image in an editing software but is searchable) When I upload an image – and i have time – i change the name to something that includes the post’s keywords, this way i have more opportunities to rank for those keywords and be found by readers researching that topic.

Reply
Ann May 11, 2012 at 8:41 am

Vanita, you are the BEST!!! I am going to definitely look into my bounce rate!

Reply
Vanita May 11, 2012 at 8:51 am

thanks girl. be sure to review the visit time for those who visit via the photo’s link or google image search. if those entries are still sticking around, then the photos being searchable are a good thing!

Reply
Artchoo May 11, 2012 at 11:43 am

This is a great tip that I never would have thought to look for. Of course, it will still be easy to grab images from our sites, but it’s nice to know you can at least protect from being found for the sole purpose of stealing your images. Thanks, V.

Reply
Vanita May 11, 2012 at 5:44 pm

Exactly!

Reply
Jessica May 11, 2012 at 4:29 pm

Ohhhh. This is awesome, Vanita! Thank you so much!! I owe you a million dollars! I’ve always wanted to know how to do this! I’m going to try it this weekend! Fingers crossed I don’t mess up anything major!

Reply
PragmaticMom May 11, 2012 at 4:40 pm

I think I am too much of a Luddite. This is way over my head.

Reply
Vanita May 12, 2012 at 12:36 am

no worries girl, you don’t need it! keep your photos searchable!

Reply
PragmaticMom May 31, 2012 at 6:56 pm

Great tip. Thank you for the step by step instructions. I need those!

Reply
Cici November 10, 2012 at 7:30 pm

Hi, just wondering, can you use this for blogspot? for your blogs?
where does the code go? thanks ..

Reply
vanitacyril November 11, 2012 at 5:11 pm

Hi Cici, this post is for WordPress self hosted platform. I suggest checking out http://www.mayura4ever.com he has a lot of great info for those on the Blogger platform

Reply

Leave a Comment

Pin It on Pinterest