Prevent soft 404 errors (force 404 http response)
-
Is there a way to prevent WordPress from returning soft 404 error pages?
For most nonexistent links, WordPress will serve a 404 http response and display my custom 404 error page, which is the proper behavior. However, in some circumstances, such as a link to a category that no longer exists or a tag that no longer exists, WordPress displays a page that looks like a 404 page, but it is not. In Twenty Eleven, it says “Nothing Found” and “Apologies, but no results….” with a search box; this is served from the page template (e.g. archive.php), not an actual 404 page.
I don’t like this behavior for 2 main reasons:
1) It’s causing this error, as reported in Google Webmaster Tools: https://support.google.com/webmasters/bin/answer.py?hl=en&answer=181708
2) The content of the soft 404 page is baked into multiple theme files. I don’t want to have to edit all of them to match my custom 404 page, which I make adjustments to from time to time.
- The topic ‘Prevent soft 404 errors (force 404 http response)’ is closed to new replies.