Couldn’t fetch Sitemap – Issue

#1022927
  • Resolved Lubna Pathan
    Rank Math free

    Our sitemap keeps failing in Google search console. After all the pages are discovered, GSC periodically flags a few folders from the sitemap as ‘couldn’t fetch sitemap’ and the number of discovered pages drop.
    Usually, re-submitting the sitemap a few times resolves it but this issue is quite frequent and prevents our entire site from being indexed.

    We have ensured everything is correct from our end, i.e. validated the sitemap, ensured it is in the root folder, ensured it is not being cached, etc. The issue still persists.

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

    Thanks for contacting Rank Math support. We apologise for any inconvenience this might have caused you.

    Please follow the steps below to see if it works for you.

    #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 doesn’t seem to work, kindly apply the following filter code 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/

    Once done, please clear your website cache, remove all the submitted sitemaps, and resubmit only the main sitemap in the Search Console and see if that works for you.

    Let us know how it goes. We look forward to hearing from you.

    Thank you.

    Lubna Pathan
    Rank Math free

    Hi, we have tried the first and second resolution and the issue still persists.

    The 3rd solutions seems too complicated and the developer is asking whether we can just upload the line of code to functions.php
    If yes, do we need any additional code to do so?

    Thanks!

    Hello,

    No need for additional code. Simply copy and paste the single line of code we previously shared at the end of the functions.php file.

    You can check the guide to help you properly add the code to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how that goes. Looking forward to helping 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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Couldn’t fetch Sitemap – Issue’ is closed to new replies.