WordPress.org

Ready to get started?Download WordPress

Forums

Urgent need help - site directory is listed in search engine (4 posts)

  1. hiboy
    Member
    Posted 1 year ago #

    When i search in search engine such as google for my site, as i go to page 3, i realise 3 of my site directory is listed such as the title are as following

    Index of /wp-content/themes/mytheme/js

    Index of /wp-content/themes/mytheme/js/plugins

    Index of /wp-content/themes/mytheme/js/plugins/highslide

    my robots.txt is
    User-agent: *
    Disallow: /wp-admin/
    Disallow: /wp-includes/

    Sitemap: http://yourdomain/sitemap.xml

  2. Sabinou
    Member
    Posted 1 year ago #

    Your robots.txt should be enough, though O_o

    You may try adding /* (meaning /wp-admin/* ), but I don't think that was required at all.

    Do you have a google webmasters tools account ? You ought to create one, submit your sitemap, and see if it is approved and accepted, you will also have the Diagnostics panel, to tell if your robots.txt causes their engine a problem of any sort !

    Besides, how come your server allows the listing of such folders ?!?
    - no "sane" web server should allow listing the contents of a directory when loading its /name/
    - supposedly wordpress adds an index.php file in the /plugins/ folder with these nifty contents preventing listing the subfolders and contents :

    <?php
    // Silence is golden.
    ?>

    If such a file isn't present, you are fully allowed to create it and upload it.

  3. hiboy
    Member
    Posted 1 year ago #

    Hi Sabinou,

    I do have a webmaster tool and sitemap and robots.txt is submitted ,approved and accepted.

    Sorry,i dont quite understand this, kindly enlighten me

    " Besides, how come your server allows the listing of such folders ?!?
    - no "sane" web server should allow listing the contents of a directory when loading its /name/ "

  4. Sabinou
    Member
    Posted 1 year ago #

    I meant that when you load an internal folder of a website, like website.com/folder/subfolder/ : the server should NOT show a list of the files inside this, this is a BAD server setting, allowing all forms of abuse.
    By default, various web hosts allow it, while various web hosts disallow it, the fact remains, this option is BAD (meme riding : and your web host should feel bad).

    To protect your folders, you may upload yourself an index.php file containing the contents listed just above, in the short term this fix will do the job :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.