Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1251027

    Hi,
    I am having a lot of indexing errors and warnings from google because it is indexing urls’s that shouldn’t exist but that link to individual images on the site by their filename (without the .jpg or whatever) or what seems to be listed in “Title” meta (automatically applied when uploaded). These pages then have a comment box, even though (I thought) commenting is completely disable on the site. It should surely not be possible to access image via URL without /wp-content/uploads/… etc etc in the url path?? How does this url jump directly to the actual image for comment?

    Is there any way to prevent this from happening – ie that only site url’s that are valid in sitemap are seen and everything else gives error? I am not sure of expected result from adding “/feed” but this should not happen by creating url to an image that is top level on site (as in examples in private box).

    Thanks

    • This topic was modified 4 years, 2 months ago by patricknh.
    #1251031

    Update – I have found a code snippet for the child functions.php that seems to work now by redirecting to the parent page? Maybe this is the solution. I am trying it now so those urls above do not work anymore so it seems as my problem may now be solved!

    “Solution” from:

    and code snippet from: “Redirect Via Custom Function” on that page

    #1251300

    Hi,

    Thanks for the update. You can’t remove the attachment pages which are automatically generated by WordPress, but you can redirect them as you mentioned. If that is working then I would say that it’s a good solution.

    Best regards,
    Rikard

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.