Home » Exclude XML and XSL files from caching plugins
Exclude XML and XSL files from caching plugins

Overview

Optimize your XML sitemaps and XSL stylesheets by excluding them from caching plugins. Here's how to configure popular caching plugins with SiteSEO.

Hummingbird

  • Navigate to Hummingbird -> Caching page.
Hummingbird - caching submenu
  •  Go to Exclusions section.
Hummingbird - Exclusions section
  • Add these regex rules:
[a-z0-9_\-]*[a-z0-9_\-]*\.(xml|xsl|html)(\.gz)?
([a-z0-9_\-]*?)([a-z0-9_\-]*)?\.xml
  • Save settings and clear your cache.

Swift Performance

  • Navigate to Tools -> Swift Performance.
Swift Performance
  • Go to Settings -> Caching -> General tab.
Swift Performance - general tab
  • Ensure the 'Cache sitemap' option is disabled.
Swift Performance - cache sitemap option

WP Super Cache

  • Navigate to Settings -> WP Super Cache.
WP Super Cache
  •  Go to Advanced Tab.
WP Super Cache - advanced tab
  • Go to 'Rejected URL Strings' section.
WP Super Cache - Rejected URL Strings section
    • Add these regex rules:
    [a-z0-9_\-]*[a-z0-9_\-]*\.(xml|xsl|html)(\.gz)?
    ([a-z0-9_\-]*?)([a-z0-9_\-]*)?\.xml
    • Save settings and clear your cache.

    LiteSpeed Cache

    • Navigate to LiteSpeed cache -> Cache.
    litespeed cache
    • Go to Excludes tab.
    litespeed cache - excludes tab
    • Find 'Do Not Cache URIs' field.
    litespeed cache - Do Not Cache URIs field
    • Add the following regex rules:
    [a-z0-9_\-]*[a-z0-9_\-]*\.(xml|xsl|html)(\.gz)?
    ([a-z0-9_\-]*?)([a-z0-9_\-]*)?\.xml
    • Save settings and clear your cache.

    W3 Total Cache

    • Navigate to the following sections:
    • Performance -> Page cache -> Never cache the following pages
    W3 Total Cache - section1
    • Performance -> Minify -> Never minify the following pages
    W3 Total Cache - section2
    • Performance -> Database cache -> Never cache the following pages
    W3 Total Cache - section3
    • Performance -> Browser cache -> 404 error exception list
    W3 Total Cache - section4
    • Add the following regex rules:
    [a-z0-9_\-]*[a-z0-9_\-]*\.(xml|xsl|html)(\.gz)?
    ([a-z0-9_\-]*?)([a-z0-9_\-]*)?\.xml
    • Ensure to save the settings and clear your cache for the changes to take effect.

    WP-Optimize

    No additional exclusions needed.

    Autoptimize

    No additional exclusions needed.

    Conflict with DIVI / Google Fonts Loading

    • Navigate to Divi -> Theme Options -> General -> Performance, disable 'Improve Google Fonts loading', and save your settings.
      Was this page helpful?
      Newsletter Subscription
      Subscribing you to the mailing list