search engine optimization articles do it yourself seo hiring search engine experts html and search engine optimization web site analysis and submission service

HTML Help: Prevent Image Indexing

Is there a way to stop image search engines from indexing images?
You can stop most of them by including a directive in a robots.txt file. A robots.txt file is a simple text file that provides instructions to search engine robots, or spiders, that most engines will honor.

To create a robots.txt file, open a text editor such as Notepad and on a new, blank page, and copy and paste the following code:

# Robots.txt for BoogieJack.com
# disallow the images directories

User-agent: *
Disallow: /images/

#disallow specific file types

User-agent: *
Disallow: /*.gif$

User-agent: *
Disallow: /*.jpg$

User-agent: *
Disallow: /*.png$
Then save it as robots.txt and upload it to your ROOT directory. The root directory is where you store your index page on your host's server. Here's what each line means in the above code:
# Robots.txt for BoogieJack.com
This is a comment. Any line that starts with a hash mark (#) is ignored by the spiders, it's for making comments to yourself. In this case, I'm identifying what domain I made this robots.txt file for. You can change that to your domain or remove the line.
# disallow the images directories
A comment I included for you so you'll remember what all that strange code is. You can remove it if you prefer.
User-agent: *
Lists which search engine spider the directive immediately following is intended for. The asterisk (*) is a wild card character, meaning all search engine robots should follow the directive. Since there are over 300 search engine spiders, using the wild card is a necessity. If you didn't use the wildcard entity you'd have to list each spider you want to disallow one at a time.
Disallow: /images/
Tells the robots not to include the contents in the images directory. If you keep your images in a different directory, change that to whatever the name of the directory is where you keep your images.
Disallow: /*.gif$
Tells the robot not to include any file with a .gif image extension.
Disallow: /*.jpg$
Tells the robot not to include any file with a .jpg image extension.
Disallow: /*.png$
Tells the robot not to include any file with a .png image extension.
One more thing you can add directly to your pages is a special meta tag. Add this meta tag to the HEAD section of your page:
<meta name="robots" content="noimageindex">
That tells the search engines robots not to index any images on that page. This can keep your images out of a few places that have robots that do not follow the robots.txt exclusion.

If your images are already included in the search engine databases when you upload the robots.txt file, they won't be removed until the next time the image robot crawls your site. That can take 90 days or more.

This concludes the

HTML Help about Preventing Image Indexing

.
Back | HTML FAQ | HTML Tag Chart | HTML Index | Web Design Tutorials
search engine optimization course
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!

Check out SEO for YOU now!

Almost a Newsletter

Subscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
Email:

First Name:

Privacy Policy

Did you know...

The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
See my fancy bottom! :)