Title: Exclude sitemap from cache.
Last modified: October 27, 2020

---

# Exclude sitemap from cache.

 *  Resolved [ittone](https://wordpress.org/support/users/ittone/)
 * (@ittone)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/exclude-sitemap-from-cache/)
 * Sorry if this has been a topic before but I am using wp-optimize as a cache only
   plugin which I find on my site to be faster than W3TC.
 * However after searching for the answer, which I cannot find………Do I need to add
   my domain’s sitemap (www.domain.com/sitemap_index.xml/) (yoast) to the exclude
   section of advanced cache?
 * Thanks in advance.
    IT.Tone

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/exclude-sitemap-from-cache/#post-13589297)
 * [@ittone](https://wordpress.org/support/users/ittone/) Yes you’ll have to add
   the sitemap url to exclude section of WP-Optimize.
 *  Thread Starter [ittone](https://wordpress.org/support/users/ittone/)
 * (@ittone)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/exclude-sitemap-from-cache/#post-13593025)
 * Thanks for your reply.
 * Could you tell me which box to place the url in please, and also the format.
 * I am using Yoast sitemap_index.xml which does not get written as a file so should
   the entry just be:
 * /sitemap_index.xml
 * in whichever box it will reside in?
 * Last question…….
    Is it wise to cache or not cache a sitemap if using a CDN network?
 * Many thanks
    Ittone.
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/exclude-sitemap-from-cache/#post-13594570)
 * [@ittone](https://wordpress.org/support/users/ittone/) You’ll have to add it 
   to WP-OPtimize > Cache > Advanced Settings > URL to exclude in the format /sitemap_index.
   xml
 * Its okay to use cache function over CDN network.
 *  Thread Starter [ittone](https://wordpress.org/support/users/ittone/)
 * (@ittone)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/exclude-sitemap-from-cache/#post-13596149)
 * Thank-you Harshad.
 * I thought thats where the entry went…Just checking.
 * I only asked about sitemaps, because I have just changed my host to WPX and Google
   console sitemaps report my sitemap as being html instead of xml.
 * The first time google retrieves the sitemap google reports OK, but subsequent
   queries produce the failure with html.
 * Thanks
    IT Tone

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Exclude sitemap from cache.’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [ittone](https://wordpress.org/support/users/ittone/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/exclude-sitemap-from-cache/#post-13596149)
 * Status: resolved