• I installed WordPress in the root directory and have a sub-directory (i.e., /donotindex/) that I want to Disallow in a robots.txt file. When I look at this plugin (XML sitemaps) it says…

    The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!

    So how do I dissallow a subdirectory?

    http://wordpress.org/extend/plugins/google-sitemap-generator/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I would also like to know.

    In Settings > XML-Sitemap there is a checkbox:

    Add sitemap URL to the virtual robots.txt file.
    The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!

    If it’s virtual how do you edit configs you want to make?

    FYI There’s no sign of any file anywhere which I’m not too surprised about if it’s virtual.

    Also FYI My site is in a directory (not root) if that’s any use and I don’t have an existing robots.txt file.

    cheers
    Dr M

    Same with me. I want to disallow images.

    Then create a real robots.txt file in root and manually put in the Sitemap information and turn off the XML Sitemap option for using vitual.
    You should also be aware of any other plugins you are using that edit virtual robots and manually put in those items. Also the Settings -> Privacy “Private, allow regular users, block bots” option uses virtual and should be turned off. Otherwise you would put Disallow: / to block all manually.

    User-agent:*
    Disallow: /directory/
    Sitemap: http://www.yoursite.com/sitemap.xml

    Thank you, darrellonsite! I had done that, but great to get confirmation.

    I also put /images/ instead of directory – not sure what directory means. Also, to help someone else, I read somewhere that it’s best to have a line space between the directions (disallow, etc), and the sitemap line, so I did that.

    Let’s see how many images Google can take from me now…

    /directory/ doesnt mean anything. Just a placeholder as example.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Google XML Sitemaps] How to Disallow sub-directory?’ is closed to new replies.