• Resolved Manny

    (@thewebnerd)


    I have issues where I am excluding sitemap.xml, sitemap_index.xml, page-sitemap.xml from being cached.

    However, when I run an HTTP header check, sitemap.xml is showing miss while itemap_index.xml and page-sitemap.xml are showing hit.

    I tried adding the add filter for cache in function.php and the issue persists.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @thewebnerd,

    If you haven’t seen it already, we provide a guide to excluding sitemaps from cache for several popular caching plugins here: How do I prevent sitemaps from being cached?.

    We checked the page source of the sitemaps, but didn’t see any indication that they are cached versions.

    Since it’s not clear if the headers you’re checking are referring to browser caching, you may need to enable debugging in the caching plugin or follow their troubleshooting guides to confirm that your settings are working as expected.

    Thread Starter Manny

    (@thewebnerd)

    Hi Priscilla,

    Thank you for replying. I have already read that page. I am referring to browser cache. And where exactly did you check for the cached version?

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hello,

    Could you please provide us with more information on the issue you are having where the sitemaps are being cached in the browser? If you could send us a screenshot and more details, this would be helpful.

    Could you also let us know what filter you added to your functions.php file?

    Thread Starter Manny

    (@thewebnerd)

    Hello Michael,

    I used this filter: /* Disable Yoast SEO sitemap caching
    * Credit: Yoast development team
    *********
    * Please note that changes will be applied upon the next sitemap update.
    * To manually flush sitemap cache, please disable and enable the sitemap feature afterwards.
    */
    add_filter(‘wpseo_enable_xml_sitemap_transient_caching’, ‘__return_false’);

    If you run a header curl for each of the sitemap pages you will see that they are returning cache hit. I used different headers such as https://tools.seobook.com/server-header-checker/ and https://www.webconfs.com/http-header-check.php etc

    Plugin Support devnihil

    (@devnihil)

    @thewebnerd The filter you are using is for disabling transient caching for the sitemap in versions of Yoast SEO 9.0 and older. We checked on your site and see that you are using the most current version of Yoast SEO version 14.5, so using this filter is unnecessary as the cache is disabled by default.

    We reviewed the sitemap headers and whereas we do see that it is being cached, the caching is likely being performed either by your server, or by a plugin/theme on your site. We would recommend reviewing the following article for instructions on how to exclude the sitemap from the most common caching plugins: https://yoast.com/help/exclude-sitemaps-from-cache/

    If you still find that the sitemap is being cached after implementing the instructions there, we would next recommend checking with your hosting provider to check whether the caching is being performed at the server level.

    Hi @thewebnerd ,

    We’re closing this thread as there seem no further questions from you. Please feel free to open a new thread should you have further concerns.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Yoast xml sitemap cache’ is closed to new replies.