Support » Fixing WordPress » Why is Google Indexing This???

  • I just did a site check and google is indexing my wp-content/plugins folder

    I didn’t see any other folder being indexed except this one.

    I’ve had WP blogs before and have never seen this. What could be the cause? I definitely don’t need this folder exposed.

Viewing 10 replies - 1 through 10 (of 10 total)
  • chmod 750 or something. Or put in a blank index.

    The blank index.php is there in the wp-content folder, so it does not prevent Google from indexing this folder. This is the NewsPortal theme and the latest update of WordPress.

    I have an older version of WP using the Fleur theme and this is not an issue.

    I will try to CMOD 750. Is anyone else having this issue?

    I’ve only had the issue of Google indexing plugins which post their files to the site, like a translator plugin I was using once. All of the flags and the javascript from that plugin are indexed, so when I quit using it I had to redirect gone in .htaccess.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    What Google sees, anybody can see. So I would recommend disabling directory browsing for folders on your site.

    Add this line to the top of your .htaccess file (in the blog root will be fine):
    Options -Indexes

    Otto42, that worked perfectly! I added that line to my .htaccess file and it worked like a charm.

    Thank you very much. Now there is a “Forbidden” message when trying to get to those folders.

    I truly appreciate your help.

    FYI: CHMOD won’t help here. CHMOD is something the server uses to control who can and cannot access files on the server itself — i.e. which users on the server. Outside of the server, it has no effect whatsoever.

    Setting Options -Indexes only prevents the server from listing directories’ contents. Files, for instance wp-content/plugins/plugin-file.php (that’s made up) will still be accessible, and if Google could access it before, it’ll still be able to access it now.

    Another thing you may want to look into is robots.txt. This tells search engines what you do and don’t want to be included in their indexes.

    More info:

    Bear in mind that this is accessible to anyone. Check it out:

    All the major search engines read this file and respect it.

    I would recommend, for you, something like:

    User-agent: *
    Disallow: /wp-admin/
    Disallow: /wp-content/
    Disallow: /wp-includes/

    This tells all search engines to leave those directories alone.

    Incidentally, I recommend these lines, too:

    User-Agent: ia_archiver
    Disallow: /

    This stops your site being archived in the Wayback Machine project.

    User-agent: *
    Disallow: */feed*
    Disallow: */trackback
    Disallow: */wp-admin
    Disallow: */wp-content
    Disallow: */wp-includes
    Disallow: *wp-login.php

    this would prevent indexing of other non relevant content!

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    If you disallow access to wp-content, then any images you upload won’t be indexed. This may or may not be what you want.

    Also, disallowing access to your feeds is very silly, since you definitely want them to index your feeds. Google understands feeds.

    Options -Indexes is enough for most people. Unless you’re directly linking to your plugins, it won’t matter anyway. Your plugin files will *not* be accessible, because plugins are PHP files, and PHP files *run* on the webserver, and 99% of plugins don’t do anything at all when you run them like that, or they fail to work, or what have you.

    Otto42: You’re right about the PHP files, of course. Trying to load certain wordpress PHP files will just generate an error message.

    BUT error messages often contain server information. You probably don’t want these to be indexed. For instance, if you call a plugin file directly without WordPress being loaded, PHP will usually insert an error message that contains the server path to the script. That’s probably not desirable, since server paths often contain information like usernames.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    maerk: Add this to your .htaccess file (or just edit the php.ini to turn off error reporting).

    php_flag display_errors off
    php_value error_reporting 0

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Why is Google Indexing This???’ is closed to new replies.