Title: Cache 404s?
Last modified: February 26, 2026

---

# Cache 404s?

 *  Resolved [Jason LeMahieu (MadtownLems)](https://wordpress.org/support/users/madtownlems/)
 * (@madtownlems)
 * [3 months ago](https://wordpress.org/support/topic/cache-404s/)
 * Howdy 👋
 * I noticed that Surge doesn’t seem to be involved in requests that 404. X-Cache
   header is always ‘bypass’.
   Curious if that’s an intentional choice, technically
   unfeasible, or perhaps something that could/should be added?
 * 
   Thanks much as always!!

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

 *  Plugin Author [Konstantin Kovshenin](https://wordpress.org/support/users/kovshenin/)
 * (@kovshenin)
 * [3 months ago](https://wordpress.org/support/topic/cache-404s/#post-18835022)
 * Hey Jason,
 * Surge [definitely considers](https://github.com/kovshenin/surge/blob/8782e669df9eb9cfd9ce21ff678517b39373efc9/include/cache.php#L69)
   a 404 response for caching, however WordPress core [sends nocache headers](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/class-wp.php#L724)
   by default for 404 requests, which the Surge plugin respects. If you’d like to
   actually cache and serve 404 request, you’ll have to modify the default core 
   behavior using the `pre_handle_404` or `nocache_headers` filters to prevent these
   headers from being sent.
 * Hope that helps!
 *  Thread Starter [Jason LeMahieu (MadtownLems)](https://wordpress.org/support/users/madtownlems/)
 * (@madtownlems)
 * [3 months ago](https://wordpress.org/support/topic/cache-404s/#post-18835162)
 * >> Hope that helps!
 * Yes – it helps a ton and we’re now Surge-caching our 404 pages. Thanks for the
   continued support!
 *  Plugin Author [Konstantin Kovshenin](https://wordpress.org/support/users/kovshenin/)
 * (@kovshenin)
 * [3 months ago](https://wordpress.org/support/topic/cache-404s/#post-18835200)
 * You’re very welcome!

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcache-404s%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/surge/assets/icon-256x256.jpg?rev=2639176)
 * [Surge](https://wordpress.org/plugins/surge/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/surge/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/surge/)
 * [Active Topics](https://wordpress.org/support/plugin/surge/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/surge/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/surge/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Konstantin Kovshenin](https://wordpress.org/support/users/kovshenin/)
 * Last activity: [3 months ago](https://wordpress.org/support/topic/cache-404s/#post-18835200)
 * Status: resolved