cache - Getting soft 404 errors (200 status) when caching plugins are enabled

I have a blog running the latest stable version of WordPress on a dedicated virtual server with the following situation.

I have a blog running the latest stable version of WordPress on a dedicated virtual server with the following situation. (Replace [caching plugin] with W3 Total Cache, Hyper Cache, or Quick Cache, as I've tried all three with the same results.)

  1. [caching plugin] is disabled. I visit a known bad link on my site (/) and receive a 404 error page. I can verify in Chrome's Inspector and/or Firebug that the "404 Not Found" status is being properly served in the HTTP headers.

  2. I turn [caching plugin] on and visit the same URL. On the initial visit I am served a cached page (verified by the debugging comments inserted by the plugin at the bottom of the HTML source) with the proper "404 Not Found" status in the HTTP header.

  3. If I visit the page again (/), I'm served the same cached page from #2 above displaying the "404 - Page Not Found" error to the user, but with a "200 OK" status in the HTTP header.

  4. If I turn [caching plugin] off and visit the page again, I am again being served an uncached page with the correct "404 Not Found" status in the HTTP header.

Any idea what might be going on here? This is seems to be causing some an issue where Google Bot is attempting to index some non-existent pages because its seeing the "200 OK" HTTP header instead of the proper 404.

I have a blog running the latest stable version of WordPress on a dedicated virtual server with the following situation. (Replace [caching plugin] with W3 Total Cache, Hyper Cache, or Quick Cache, as I've tried all three with the same results.)

  1. [caching plugin] is disabled. I visit a known bad link on my site (http://example/xyzz/) and receive a 404 error page. I can verify in Chrome's Inspector and/or Firebug that the "404 Not Found" status is being properly served in the HTTP headers.

  2. I turn [caching plugin] on and visit the same URL. On the initial visit I am served a cached page (verified by the debugging comments inserted by the plugin at the bottom of the HTML source) with the proper "404 Not Found" status in the HTTP header.

  3. If I visit the page again (http://example/xyzz/), I'm served the same cached page from #2 above displaying the "404 - Page Not Found" error to the user, but with a "200 OK" status in the HTTP header.

  4. If I turn [caching plugin] off and visit the page again, I am again being served an uncached page with the correct "404 Not Found" status in the HTTP header.

Any idea what might be going on here? This is seems to be causing some an issue where Google Bot is attempting to index some non-existent pages because its seeing the "200 OK" HTTP header instead of the proper 404.

Share Improve this question asked Mar 22, 2011 at 21:59 berberichberberich 1311 silver badge6 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

W3 Total Cache has the following option that if enabled will cause this behavior:

Cache 404 (not found) pages

Reduce server load by caching 404 pages. If the disk enhanced method of disk caching is used, 404 pages will be returned with a 200 response code. Use at your own risk.

Other caching plugins may have similar functionality.

Further troubleshooting leads me to believe this was somehow related to the theme I was using. After disabling it and enabling a different one I received the proper 404 headers while using a caching plugin.

I still don't know what in the theme would be causing this, but at least there's a workaround.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745460706a4628696.html

相关推荐

  • cache - Getting soft 404 errors (200 status) when caching plugins are enabled

    I have a blog running the latest stable version of WordPress on a dedicated virtual server with the following situation.

    7小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信