Joomla Images and Robots.txt – Be Sure Google and Other Search Engines Can Index Them

12th August, 2009 in SEO 5 Comments

By default Joomla’s robots.txt file includes a line to disallow search engines indexing your images folder. This means the images on your Joomla site will not be indexed in Google and other search engines Images results. Here’s how to allow images to be indexed.

What is the Robots.txt File

The robots.txt file which should be located in your website root folder provides search engines, and other “robots” what not to index and other instructions on your website. You can use it to specify select search engines and bots or all of them, and tell them what directories and files to index or not. For example, the following robots.txt file is for ALL search engines and bots (indicated with User-agent: *) and states to “Disallow” indexing of the cgi-bin, images, tmp and private folders:-

User-agent: *
Disallow: /cgi-bin/
Disallow: /images/
Disallow: /tmp/
Disallow: /private/

Using the above code in the robots.txt file you can define what folders and files you want search engines and bots to index or not on your site. More information on the robots.txt file can be found here http://en.wikipedia.org/wiki/Robots_exclusion_standard.

How to Allow Images to Be Indexed

By default Joomla adds the Disallow: /images/ line to the robotos.txt file which is very bad if your Joomla site is used as a photo gallery system.  So to be sure your images are indexed, download the robots.txt file, edit it and delete this line, then save and re-upload. Without this line search engines and bots are free to index your images folder.

What About Images within Components like Virtuemart or a Photo Gallery System?

Some components may store their images within the component directory itself. The robots.txt file also disallows indexing of the components folder where the component images directory would be. So there is a little more work involved in allowing this… you have three main options:-

  1. Remove the Disallow: /components/ line, and re-insert Disallow: /each_componet_path/ except the directory where the images are. This is long winded, you may have many lines and have to add them in when you add new components
  2. Some components may allow you change the images directory, so see if you can change it to within the /images/ folder
  3. Some search engines, noticeably Google, allow to use the Allow: directive. So after all your Disallow’s, insert an Allow: line to the folder path where the component images are. Note: this will only work on some Search Engines like google that support it. But hey, Google is the most important right!
Comments
Picture of makale

makale 2nd January, 2012 at 18:10 pm

Thank you very much.

I did the changes just now.

And now i have to sit back and watch it

Picture of vraadoo

vraadoo 2nd January, 2012 at 18:10 pm

Thanks for share this tips, i need to change & update my robots.txt for SEO.

Thanks again.

Picture of Bill

Bill 28th February, 2013 at 0:15 am

I use joomla for 3 years and I never knew why my images not in google schow. Thank you very much.

Picture of Tom

Tom 2nd October, 2013 at 10:55 am

I removed the Disallow: /images/ from my robots.txt two years ago, I added alt tags to my images, but still Google doesn't show them. What else can I do to motivate Google?

Picture of Laurence Cope

Laurence Cope 2nd October, 2013 at 16:03 pm

Try creating an images sitemap see if that helps, see https://support.google.com/webmasters/answer/178636?hl=en

Leave a Reply

Recent