Attachment Sitemap Returns Error 404

#758364
  • Resolved Daniels Bethers
    Rank Math free

    Hi there,

    We just migrated our website from AIOSEO to RankMath SEO, and so far are more than satisfied with the plugin, but after doing extensive debugging, we are still encountering a problem, that we have no idea how to fix.

    Previously, we hadn’t set up our Media Library to index on Google, but after optimizing all image file names, ALT descriptions and formats, we’d love for them to start indexing.

    We enabled the attachment sitemap, but for some reason it keeps returning Error 404: Page Not Found.

    We’ve followed the publicly available knowledge base article on this issue, doing all the steps – excluding the sitemap from caching plugins both through plugins, and the server side platform, flushed the sitemap cache, tried disabling Cloudflare proxying, and gone through robots.txt and .htaccess with the help of our hosting (Cloudways) supporr, but the problem is still present.

    We have ran out of any other possible solutions, so decided to try to reach out to you for help in fixing this issue.

    Your help would be greatly appreciated, so please let us know if you need any additional details that would help you look into the source of this problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Thank you for reaching out to us regarding the issue with the attachment sitemap returning a 404 error after migrating from AIOSEO to RankMath SEO. We appreciate your detailed explanation of the steps you have already taken to troubleshoot the problem.

    To address the 404 error with the attachment sitemap, please ensure that your attachment pages are set to index in Rank Math. You can check and adjust this setting by navigating to Rank Math SEO → General Settings → Links Section and verifying that the setting for Redirecting Attachments is configured correctly.

    If the issue persists after confirming the attachment pages’ indexing settings, you can refer to our knowledge base article on fixing sitemap issues in Rank Math for additional troubleshooting steps.

    If you require further assistance or encounter any difficulties while resolving the problem, please provide us with any additional details or screenshots that may help us investigate the issue more effectively.

    We are here to assist you and resolve this matter promptly. Thank you for your patience and cooperation.

    Warm regards.

    Sources:
    Using Video Sitemaps in Rank Math
    Why the Sitemap_Index.xml is Throwing a 404 Error » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    How to Configure Sitemaps in Rank Math – Best Settings and Tips

    Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    Please head over to your WordPress Dashboard > Rank Math > Titles & Meta > Attachments, and from there make sure the Media Robots Meta is set to index.

    Once done, please follow the steps below to clear your sitemap cache:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    3. If the above steps don’t seem to work, kindly apply the following filter to your site.

    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
    

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The ticket ‘Attachment Sitemap Returns Error 404’ is closed to new replies.