• Hi,

    One of my sub-directories can be viewed as index pages on the internet. Google had indexed 60 pages ?? when i discovered it. So far they all come from the wp-content folder.

    Have you guys heard of this?

    Yoast SEO is 1 of 3 plugins that I have installed, the others are Revolution slider and Redirection.

    Any ideas here?

    https://www.ads-software.com/plugins/wordpress-seo/

Viewing 3 replies - 1 through 3 (of 3 total)
  • This has nothing to do with the WP SEO plugin (nor with any of the other plugins).

    This is to do with your server settings. You can change those for your website using .htaccess.

    Add this line at the top of your .htaccess file on a separate line:

    IndexIgnore *

    Oh.. and please mark this topic as resolved.

    Thread Starter Frodde

    (@frodde)

    Hi, thank you JRF,

    When i inserted that, It changed, now the server distributes fatal error messages from the all those directories.

    I expected 404-messages, like rest of the site. Guess i can have misunderstood this, maybe it SHOULD look like that if something hits exactly those sub-directory adresses?

    Sounds like it is working like it should.

    Short explanation:
    The WP .htaccess directives will check if something is an existing file or directory and only if it isn’t, it will load WP to handle the page request.
    That way images and such (files) linked from your theme will get loaded without a problem, while permalinks (non-existent files/directories) will get send to WP to handle.

    As the sub-directory exists, WP will not handle the request, but will let the server handle it. The error message you see is most likely the server default.

    You can however change that to let WP handle those kind of errors as well.

    Check the error number your server is returning and for that error, add something along the lines of the following to your .htaccess file:

    ErrorDocument 404 /index.php?error=404

    Hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sub-directories can be viewed in public.’ is closed to new replies.