• Resolved khanhvo

    (@khanhvo)


    Hi there,

    There is an issue with our website’s sitemap. It is currently displaying URLs that return 404 errors and no longer exist on our site.

    I have attempted to resolve the issue by disabling and re-enabling the sitemap, and I have also ensured that the sitemap link is excluded from cache. However, the problematic URLs persist.

    Could you please advise on how to remove these outdated URLs from our sitemap?

    Sincerely,

    Khanh

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @khanhvo,

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

    Please follow these steps to flush 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. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:

    /** 
    * Filter if XML sitemap transient cache is enabled.
    *
    * @param boolean $unsigned Enable cache or not, defaults to true
    */
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    If you’re not sure how to add this code, you can follow this guide:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Sitemap Still Showing 404 URLs After Disabling and Re-enabling’ is closed to new replies.