• I did a site:mysite.com and saw that Google has indexed lots of strange pages and files. They look like they are my plug in and theme files.

    Is there a way to rectify this and if so how?

    Will this suffice:

    Disallow: wp-admin/
    Disallow: wp-content/plugins/
    Disallow: wp-content/themes/

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’d really like to know the answer to this question as well.

    What do we add to our robots.txt file to allow the search engines to index our content but not the plugins and themes?

    jf80 (if you’re still looking for an answer!), yes, the way with robots.txt that you suggest should work…

    All search engines:

    User-agent: *
    Disallow: /wp-content/themes/plugins/
    Disallow: /wp-content/themes/yourtheme/
    Disallow: /wp-admin/
    Disallow: /wp-includes/

    Just add in any directories you don’t want indexed.

    I’d also suggest putting a blank index file in any directories, just to hide the directory contents.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stop Google indexing my plugins and other pages?’ is closed to new replies.