A LiteSpeed Cache Hit on a 404: What It Proves and What It Doesn’t

Seeing X-LiteSpeed-Cache: hit on a WordPress 404 does not mean a visitor received an HTTP 200, and it does not by itself explain why a new page is missing. It means the error response may have been served from a cache. The first diagnostic job is to keep the status code, cache state and content state separate.

DocsHook observed a LiteSpeed cache HIT on an HTTP 404

On 2 November 2026 we requested a deliberately nonexistent DocsHook URL twice without login. The first response was HTTP 404 with X-LiteSpeed-Cache: miss; the repeat was still HTTP 404 but had X-LiteSpeed-Cache: hit. Cloudflare reported DYNAMIC on both. This confirms a cached error response for that URL at that time. It says nothing about whether a future real page at the same path would remain stuck as 404 after a normal WordPress editor save.

Two anonymous requests to one nonexistent DocsHook URL both return HTTP 404; LiteSpeed changes from miss to hit while Cloudflare remains DYNAMIC.
Diagram reconstructed from DocsHook response headers recorded on 2 November 2026; not a browser screenshot.

In a separate isolated WordPress/LiteSpeed lab, a temporary test post was deleted with WP-CLI. Its previously cached public HTML continued to return 200 until we cleared the isolated server cache, after which the URL returned 404. That deletion bypassed the normal editor workflow; it is not evidence that a standard editor deletion fails to purge. LiteSpeed's FAQ says normal page edits automatically purge the page and related archives. Keep this distinction when diagnosing a real site.

Diagnose whether the missing URL is unpublished, redirected or cached

Record the exact requested URL and any redirect. Then make two anonymous GET requests, saving the HTTP status, final URL, X-LiteSpeed-Cache, CF-Cache-Status, Cache-Control and visible page title. A 404 cache hit can be a correctly cached 404. A 200 cache hit with old content is a different state. A 404 on an old slug that redirects elsewhere should be evaluated at its final destination, not by the old address alone.

Confirm the WordPress object exists and is actually published under that slug. A draft, scheduled post, wrong language path or changed permalink can explain an anonymous 404 without any cache fault. Check a known-good page on the same host to separate a one-URL problem from a site-wide outage. Only after the content state is established should you compare cached and uncached responses using LiteSpeed's troubleshooting method.

Fix the missing page or stale 404 at the responsible layer

If WordPress does not have a public post at that URL, create or publish the intended content through the normal editorial process; purging cannot manufacture a page. If the public object exists but a known old cache entry persists, purge the specific URL or relevant error-page cache, then check the first anonymous miss and a repeat hit. LiteSpeed's Toolbox documentation distinguishes purging error pages from purging all cache. Avoid a site-wide purge for a single path unless the evidence points to a broader problem.

If a delete or rewrite came from custom code, imports or direct database/CLI changes, inspect whether that workflow triggers the necessary purge hooks. Do not install a blanket “never cache 404” rule merely because one URL changed; error-page caching can be legitimate. If the fix is a new cache rule or hook, record its prior value and test a fresh URL plus the affected URL so rollback is possible.

Our live test proves only 404 miss-to-hit behavior; the isolated deletion proves only a cache entry can outlive that non-editor state change. The article does not claim a production DocsHook outage, a failed normal purge, or a universal LiteSpeed bug. The visitor-versus-logged-in guide covers a different stale-page experiment with its own limits.