404 Error in Sitemap Every 3-4 Days

#939056
  • Resolved Hemant Kumar
    Rank Math free

    Hello,

    I am getting a 404 error in the XML sitemap every 3-4 days. Once I click on Permalinks and re-save, it will start working properly and after 3-4 days, got the same problem.

    It is happening in one Taxonomy sitemap only not in the whole site Sitemap.

    Please tell me how to fix this issue permanently.
    I added a link to that sitemap in sensitive data.

Viewing 1 replies (of 1 total)
  • Hello,

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

    It mostly happens when your sitemap is heavily cached. In this case, please try to follow the steps below and see if that 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. Apply the following filter to your site to disable the transients cache for sitemap.

    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.

    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 1 replies (of 1 total)

The ticket ‘404 Error in Sitemap Every 3-4 Days’ is closed to new replies.