• Resolved jaguar54

    (@jaguar54)


    I have a problem with a ‘attachments_sitemap’ that was created prior to reinstalling Yoast. I can add and remove any/all sitemaps using the published method within Yoast SEO, and I now have the attachments sitemap switched off. However, this out of date sitemap remains untouched and Google is busy crawling it and coming up with 401 errors because the images referenced within this orphaned sitemap have since been moved. I have applied the redirect and so now the URIs redirect to a valid page (where the images used to be). But how can I remove this rogue sitemap?

    To be clear, if I switch attachments sitemap on in Yoast, a new current attachments sitemap is created alongside the orphaned one.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @jaguar54

    Thanks for reaching out about your attachment sitemap. Disabling Media pages in WordPress > Yoast SEO > Settings > Advanced > Media pages removes the attachment sitemap. Since this doesn’t remove the first attachment sitemap URL, this is indeed strange behaviour. Please try the following steps:

    1. Toggle the button to turn OFF and ON the sitemap feature in WordPress Yoast SEO > Settings > General > Site Features > APIs > Sitemap.
    2. Without making any changes, resave the permalink settings in WordPress > Settings > Permalinks

    If this doesn’t make any difference, perform a conflict check as instructed?here.

    Do let us know how it goes.

    Thread Starter jaguar54

    (@jaguar54)

    OK, so I have been through your suggestions – no difference.

    I installed Health Check & Troubleshooting. While in Troubleshooting mode with just Yoast activated, the rogue attachments_sitemap disappeared. Back out of Troubleshooting it has reappeared. Presumably this indicates that one of the other plugins is causing the issue. I will proceed with enabling one additional plugin at a time until the rogue sitemap reappears.

    I also installed WP Healthcheck, which detected remnants of AIOSEO in WordPress startup files. I used that tool to remove them but the problem remains. Incidentally, I experimented with AIOSEO around the time that the rogue sitemap is dated. It was not as good as Yoast and so I de-installed it and switched back to Yoast. I expect something in this process has caused the sitemap problem.

    Thread Starter jaguar54

    (@jaguar54)

    That was an interesting exercise…

    Troubleshooting enabled – Yoast enabled (basic posts and pages sitemaps)

    All other plugins enabled one by one with check of sitemaps each time – all as it should be

    Astra theme enabled – no problems

    Troubleshooting mode disabled – sitemaps correct (no rogue sitemap). According to Yoast – Site features – View the XML Sitemap

    However, I deleted the sitemap_index in Google Search Console, then re-submitted sitemap_index using https://sitename/sitemap_index.xml. The rogue attachments sitemap was still present.

    So now, Yoast doesn’t see the rogue sitemap (it did previously), but it is still present!

    Thread Starter jaguar54

    (@jaguar54)

    SOLUTION:

    I browsed the database manually. It showed a number of residual tables from both Rank Math and AIOSEO which I experimented with before reverting to YoastSEO (because it turned out to be better than the rest!).

    I used WP-Optimize to delete those tables, if only to clear the clutter, and now there is no sign of the old attachments_sitemap which must have been lurking in those redundant tables. Shame on you Rank Math and AIOSEO for not cleaning up behind yourselves.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Yoast Orphaned attachments_sitemap’ is closed to new replies.