Viewing 3 replies - 1 through 3 (of 3 total)
  • Every image that is uploaded into a page is assigned an attachment page exactly as you described.

    Tell search console to ignore attachment pages or install a sitemap with only the pages you want indexed

    Thread Starter nick_byrd

    (@nick_byrd)

    Hi @whitsey. I must have been insufficiently clear.

    The image URLs that are being generated (e.g., the second bullet point in original post) are erroneous: they are not the attachment URLs that WordPress creates (and allows me to customize). They do not lead to attachments. They lead to error pages—e.g., “THERE HAS BEEN A CRITICAL ERROR ON YOUR WEBSITE. LEARN MORE ABOUT DEBUGGING IN WORDPRESS.” Hence, the search console errors.

    The site’s attachment pages work as they are setup to (in WordPress settings). I am not having issues with attachment pages.

    So it’s the error-producing, non-attachment URLs (e.g., the second bullet in the original post) that I want the site to stop generating and/or including in sitemaps.

    Alas, I cannot find any setting in the WordPress dashboard that makes sense of why these non-attachment, error-producing URLs are being generated in the first place.

    You might need to re-save/reconfigure your permalinks – If I have a page https://www.domain.com/mypage/ and I upload an image to this page, WordPress will create an attachment page at: https://www.domain.com/mypage/myimage/. Attachment pages are usually ignored by Google because there are no links to these pages on your site and hence, there is no way for google to find them… unless … you add them into your sitemap which google reads and indexes.

    I can see in your sitemap that you have an images sitemap: https://philosophyofbrains.com/image-sitemap-1.xml in your sitemap: https://philosophyofbrains.com/sitemap.xml. The sitemap says it is generated from Jetpack so you need to configure the Jetpack sitemap setup.

    These attachment pages appear to be correct (in their URL) however, there is something going wrong on the page which you need to debug: “THERE HAS BEEN A CRITICAL ERROR ON YOUR WEBSITE. LEARN MORE ABOUT DEBUGGING IN WORDPRESS” – What does it say in the error_log? This error should be logged in error_log which might direct you to the actual problem.

    1. Remove media from your sitemaps
    2. Look at ‘Redirection’ and redirect these attachment pages to the page itself
    3. Debug the actual error on these pages and resolve it

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress adding image titles to end of post URLs causing search console errors’ is closed to new replies.