Support » Plugin: Quick Cache (Speed Without Compromise) » Cached 404 not found pages sending 200 OK headers? Bad for SEO.

  • Resolved jumbo


    Quick Cache caches 404 not found pages. There’s no option to disable this, but that isn’t my main concern. The problem is it’s serving these 404 pages with the 200 OK header status code instead of the proper 404 not found header.

    This allows 404 pages to be indexed by search engines, which is obviously bad.

    I prefer 404’s never be cached, but if they are a 404 status code should always be sent when serving these pages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m having the same problem…

    I found a solution that doesn’t require hacking the plugin. First, you must have a 404.php template in your theme folder, which should be located here:


    In that file, add the following to the top:

    if (is_404()) {
        define('QUICK_CACHE_ALLOWED', false);

    This is processed before Quick Cache does its thing, and tells it not to cache 404 pages, which assures the 404 status code is always properly sent out. The ‘QUICK_CACHE_ALLOWED’ constant and instructions for using it this way was actually in the plugin’s read me file all along.

    There’s a post about this on the official developer’s website that suggests putting the code above in a MU (must use plugin), but it didn’t work for me. Here’s a reference to the URL for those that want to read about it:

    I also came across another post of someone using another method to that optionally allows 404’s to be cached, while still sending out the 404 status code. I don’t much like that approach because it requires modifying the plugin code, which isn’t really future-roof. Here’s a reference to that for those that are interested:

    Just noticed that the 404 page sent a 200 ok header which is not cool at all :-/

    @jumbo: Thanks for the solution, this did the trick!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cached 404 not found pages sending 200 OK headers? Bad for SEO.’ is closed to new replies.