Mobile app version of vmapp.org
Login or Join
Cofer257

: Correct usage of robots.txt file ("Googlebot-Image" and "Mediapartners-Google") This is the current robots.txt file I am using on a site of mine. I have excluded large parts of the IP.Board forum

@Cofer257

Posted in: #RobotsTxt #UserAgent

This is the current robots.txt file I am using on a site of mine. I have excluded large parts of the IP.Board forum in order to try and cut down on duplicate content. I've also excluded some WordPress search pages (as well as admin pages).

However, I want the Google Images to be able to crawl anywhere, and I also want the AdSense bot to be able to crawl anywhere.

Have I done it right? I'm now a little confused after reading that the addition of User-agent: Googlebot may override certain other values. Does the position of things in the file matter?

####################################################
# ALLOW MEDIA BOT TO CRAWL ANYWHERE
#####
User-agent: Mediapartners-Google
Allow: /

####################################################
# ALLOW IMAGE BOT TO CRAWL ANYWHERE
#####
User-agent: Googlebot-Image
Allow: /

####################################################
# ALLOW MAIN GOOGLEBOT SPECIFIC ACCESS
#####
User-agent: Googlebot
Disallow: /forums/calendar/
Disallow: /forums/gallery/
Disallow: /forums/members/
Disallow: /forums/user/
Disallow: /forums/index.php
Disallow: /forums/*&search_tags=
Disallow: /search/
Disallow: /*?s=
Disallow: /wp-admin/
Disallow: /wp-content/

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

2 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

Does the position of things in the file matter?


No. The groups can be in any order.


I'm now a little confused after reading that the addition of User-agent: Googlebot may override certain other values.


Any one crawler will only look at one group in the robots.txt file. The crawler will only look at the most specific group, determined by the length of the match against the user-agent record.

So, providing you have a Googlebot-Image group then the Googlebot-Image bot will only match this group. All other Googlebots (inc. News) will match the Googlebot group.

Your robots.txt file looks OK to me.

10% popularity Vote Up Vote Down


 

@Rivera981

Thing looks fine but why do you disallow /forums/gallery/? Is that a media gallery containing images? If it is then avoid disallowing that directory as a whole.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme