Support » Plugins » [Plugin: WP Super Cache] Caches 404 pages incorrectly

  • WP Super Cache returns the wrong header for cached 404 pages.


    ash@ash-workstation:~$ curl -I
    HTTP/1.1 404 Not Found
    Date: Sat, 03 May 2008 07:43:36 GMT

    Moments later:

    ash@ash-workstation:~$ curl -I
    HTTP/1.1 200 OK
    Date: Sat, 03 May 2008 07:43:39 GMT

    This is a serious issue, as search engines respond strangely to these pages. Setting the status to “half on” bypasses the super-cache, and fixes the problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thanks AshleyK for reporting that. Shouldn’t be too hard to fix – the plugin will have to avoid caching 404 pages. I thought there was a check for that already in there but I must be wrong.

    Hmm, there is a call to is_404() in the ob_callback function. 404 pages shouldn’t be cached at all!

    I just tested on my two main blogs at and and neither produced a cached 404 file. Perhaps it’s something to do with your theme?

    Thread Starter AshleyK


    That’s very strange. I’m getting this issue on two independent themes. I’m pretty sure I’m using the default Kubrick 404 file on the one I posted initially.

    I’ll do some investigating and get back to you. 🙂

    Thread Starter AshleyK


    Yep, I’m definitely using the default 404 page. Is there anything you can recommend I do?

    I’ve checked out wp-content/cache/supercache, and it’s creating the directory “404page”, but there’s nothing in it.

    The reason I concluded that it must be super-cache is because after clearing the cache, the initial dead page returns a 404 header, and then subsequent views return 200 Ok. As stated previously, “half on” or “off” fix this.

    My 404.php:

    <?php get_header(); ?>
    	<div id="content" class="narrowcolumn">
    		<h2 class="center">Error 404 - Not Found</h2>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Just to support Ashley a bit … 😉 The same problem with SuperCache occurs at a customer of mine.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP Super Cache] Caches 404 pages incorrectly’ is closed to new replies.