Stumble Digg Technorati Delicious

WordPress Robots.txt file for SEO

by Jesse on April 2nd, 2009 16 Comments

Having your WordPress Robots.txt properly setup for SEO will improve your rankings in the search results and get you more traffic.

WordPress, straight out of the box is an excellent platform that is feature rich, easy to use and highly customizable. But guess what, it comes with no WordPress robots.txt file and it’s navigation structure is absolutely horrible in the eyes of search engines because many of the features that make user navigation so easy and intuitive end up having the exact opposite effect for search engine spiders/bots. The ability to easily navigate to posts/pages by multiple links of various names can produce a pile of the ever-dreaded duplicate content that search engines such as Google will penalize your site for. Unless you want your pages in the supplemental index, read on to learn about how you can properly use a WordPress robots.txt file as one more SEO “must-do” to keep your site SERP’ing strong.

By properly utilizing a WordPress robots.txt file, we can tell search engine bots where to look and where to not waste their time.

WordPress robots.txt

The process of making a WordPress robots.txt file is quite easy, you just have to instruct  the bot by providing it a WordPress robots.txt file telling it to not look in any places where they won’t find any valuable content such as the wp-admin, wp-content etc folders. The WordPress robots.txt file itself should go in your root directory and guess what, it should be named robots.txt (I know, too obvious)

Here is a sample WordPress robots.txt file that you can use for your wordpress powered site, because guess what… WordPress doesn’t come with a WordPress robots.txt file by default, yep thats right, unless you have added a WordPress robots.txt file there will not be one there at all. So, here you go (this one will work just fine but you can obviously customize it to suite your specific needs by adding more directories to disallow access to.

User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/<a href="http://admindaily.com/recommends/studiopress" style="" target="_blank" rel="nofollow" onmouseover="self.status='themes';return true;" onmouseout="self.status=''">themes</a>
Disallow: /trackback
Disallow: /<a href="http://admindaily.com/my/feed" style="" target="_blank" rel="nofollow" onmouseover="self.status='feed';return true;" onmouseout="self.status=''">feed</a>
Disallow: /comments
Disallow: /category/*/*
Disallow: */trackback
Disallow: */<a href="http://admindaily.com/my/feed" style="" target="_blank" rel="nofollow" onmouseover="self.status='feed';return true;" onmouseout="self.status=''">feed</a>
Disallow: */comments
Disallow: /*?*
Disallow: /*?
Allow: /wp-content/uploads
# Google Image
User-agent: Googlebot-Image
Disallow:
Allow: /*
# Google <a href="http://admindaily.com/recommends/keyword_elite" style="" target="_blank" rel="nofollow" onmouseover="self.status='adsense';return true;" onmouseout="self.status=''">AdSense</a>
User-agent: Mediapartners-Google*
Disallow:
Allow: /*
# Internet Archiver Wayback Machine
User-agent: ia_archiver
Disallow: /
# digg mirror
User-agent: duggmirror
Disallow: /

Having a WordPress robots.txt file is by no means the only step that should be taken to optimize your WordPress site, but it is one good step in the right direction. I personally believe a combination of the proper use of WordPress SEO Meta Tags in addition to a WordPress robots.txt file is the best overall approach, the WordPress robots.txt file should be used primarily as a mechanism to restrict what folders are indexed but can also be used to show bots what areas they should specifically look in as well, I will write more on that topic another time. I hope you find this article useful, please feel free to comment and share any best practices you have in this area or questions you may have about WordPress robots.txt files.


Add your comment here or use Facebook below.

16 Responses to “WordPress Robots.txt file for SEO”

  1. Comment by jeffsawyer posted on April 2nd, 2009

    Interesting tip. I’ll have to look into doing this for my sites.

    Reply to this comment

  2. Comment by ragy B. Garagnon posted on June 2nd, 2009

    Informative post. I use a plugin “Platnum SEO”
    in my site. I can set no-follow options on all modules. It works very well.

    ragy B. Garagnon’s last blog post..Trafficseeker SEO Software

    Reply to this comment

  3. Comment by ark posted on August 26th, 2009

    This is very helpful. Thanks.
    .-= ark´s last blog ..Where to Watch UFC 102 Live Streaming Online Free =-.

    Reply to this comment

  4. Comment by ews_blog posted on September 30th, 2009

    Excellent Tip! One question: If I have wordpress in a subdomain [i.e: http://subdomain.mydomain.com How should I configure the robots.txt? Thanks
    .-= ews_blog´s last blog ..Mootools Examples I: Array =-.

    Reply to this comment

    • Comment by Jesse (Twitter name: ) posted on September 30th, 2009

      Hi and thanks for stopping by. If you have wordpress in a subdomain you do it exactly the same, as long as the robots.txt file is in your sites root folder it makes no difference what address the bots use to get there, the end result is the same.

      Reply to this comment

  5. Comment by PRO-Webs, Inc posted on November 8th, 2009

    The structure is solid, but a couple of things I noticed. I am pretty sure that you cannot use an allow command in your robots.txt… only disallow, lack of which is allow.

    Also, the wildcards are not supported by all engines, so it become necessary to use the user agent to specify rules with wildcards for just those that do… Otherwise one can make quite a mess with MSN =-) as they in all of their wisdom do not support wildcards.

    Reply to this comment

  6. Comment by Jesse posted on November 8th, 2009

    Correct, not all search engines suppost wildcards but the big G does :-) and
    I have no problem being properly indexed by Bing or Yahoo.. While this
    example is not “technically” perfect it does work for my uses and
    accomplishes what I need done.

    If the big 3 would get together and agree on a set of standards that were
    universal across the board I would jump on ship right away, until then were
    all stuck just doing what works instead of what is 100% correct.

    Reply to this comment

  7. Comment by dean posted on November 9th, 2009

    maybe i need to modify my robots again so it will become more SEO.thank you very much

    Reply to this comment

  8. Comment by Jesse posted on November 9th, 2009

    Thanks for stopping by, glad you found this post useful.

    Reply to this comment

  9. Comment by dean posted on November 9th, 2009

    maybe i need to modify my robots again so it will become more SEO.thank you very much

    Reply to this comment

  10. Comment by Jesse posted on November 9th, 2009

    Thanks for stopping by, glad you found this post useful.

    Reply to this comment

  11. Comment by Joe Jones posted on February 15th, 2010

    Admin Daily,
    I have one website that's a wordpress site of only 2 web pages. I used all the disallows you have listed but Google's keyword list for the site had “disallow”, “user”, and “agent” as the most frequently used keywords for the site. How do I stop google from using words in the robots.txt file as a source of keywords.

    Thanks

    Reply to this comment

  12. Comment by Jesse posted on February 15th, 2010

    That is very odd, let me know what your domain is or use the contact form
    here and let me know and I will take a peek at it and see why this could be
    happening.

    Reply to this comment

  13. Comment by Bogan Marketing posted on March 3rd, 2010

    Hey Jessie,

    Nice post, I went into this today too, you can check out my take on using robots.txt for silos in WordPress here

    thanks

    Reply to this comment

  14. Comment by Jesse posted on March 3rd, 2010

    Thanks for stopping by, I'll check out your article as well.

    Reply to this comment


Leave a Reply

Add your comment on this post using Facebook!

"Reading: If Only Everyone Had Customer Service Like This - http://bit.ly/b0lANV"

7415

Member Login

Member Login



For enhanced functionality connect your AdminDaily.com membership to Facebook!