• Resolved p15h

    (@prestonwordsworth)


    Dear Majumder

    I’m trying to debug the cache purging workflow which regularly results in Rank Math’s sitemaps throwing 404s.

    Steps to reproduce (which may be local to our machine):

    1. Navigate to All Pages. Then, click Purge CF Cache for a random page.
    2. Visit /sitemap_index.xml, which has a 60% chance of throwing a 404.

    The behaviour and an ad-hoc fix are documented by Rank Math, but the specific cause remains unclear beyond permalink structure having been changed. So the only thing that’s certain is that purging CF cache often results in some sort of change in permalink structure that currently requires manual flushing of permalinks.

    I’m not sure whether a permanent solution is to be sought in this plugin or from Rank Math’s side. Could you share your thoughts on this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @prestonwordsworth,
    That seems really wired. First of all, sitemaps are always BYPASSed from CDN cache and served directly from origin server. Secondly, I use Rankmath on many sites along with this plugin without any issues like this.

    If you are using an Nginx server, Rankmath requires some special code to be put in the nginx config for it to properly work. Screenshot: https://i.imgur.com/choULYx.jpeg

    So, if you are on an Nginx server and don’t have these rules, maybe that’s what causing the issue?

    Thread Starter p15h

    (@prestonwordsworth)

    Hmm… Looks like it’s more endemic to our particular environment than I realised. And we’re on good old httpd.

    The only thing I know at the moment is this routinely happens after a purge action. Let me take some time to think things through.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @prestonwordsworth,
    Yah sure. you can check the response header of your sitemap page and you can see they are excluded from caching.

    Thread Starter p15h

    (@prestonwordsworth)

    Yes, I can confirm the sitemap is excluded from caching! Trying to think of other potential causes…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Debugging sitemap 404 after purge’ is closed to new replies.