The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Quick Cache (Speed Without Compromise)
[resolved] Cached 404 not found pages sending 200 OK headers? Bad for SEO. (4 posts)

  1. jumbo
    Posted 3 years ago #

    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.


  2. Adrià López
    Posted 3 years ago #

    I'm having the same problem...

  3. jumbo
    Posted 3 years ago #

    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:

  4. nicoter
    Posted 3 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.