My sitemap redirects to 404 page after sometimes

#661222
  • Resolved Mansoor Ahmed
    Rank Math free

    Hey,

    I am noticing some unusual trend on two of my sites that my sitemap urls redirects to 404 pages but when I apply the fix of saving changes in permalink section of both wordpress – it start working again, but again after few days, it again start redirecting to 404 pages.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.

    We have checked your sitemap and can see that it is displaying correctly.

    However, as you mentioned, it usually works for a few days before giving a 404 error. A 404 error means that the sitemap does not exist for a variety of reasons.

    Please try following 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. 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/

    Here is a guide fo your reference: https://rankmath.com/kb/sitemap-404-error/

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

The ticket ‘My sitemap redirects to 404 page after sometimes’ is closed to new replies.