Skip to content

robots.txt for WordPress – short & sweet

On my first WordPress site I went and added all of the files I didn’t want search engines indexing to my robots.txt file thinking that it was necessary to keep them out of the SERPS. But WordPress makes it easier than I was trying to make it by starting almost every file in the root, and all subfolders, with ‘wp-‘. With a 2 line robots.txt file you can block most everything that needs to be blocked.

 User-agent: *
Disallow: /wp-
Published inBlogging

2 Comments

  1. Wow!
    I was thinking about exactly this way, just was looking for a ready-made file to copy-paste :)
    Unfortunately this isn’t the place to copy the whole thing directly, but anyway, nice to see like-minded folks

Leave a Reply

Your email address will not be published. Required fields are marked *