• 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter peter_quinn

    (@peter_quinn)

    I’ve determined that the problem occurs when a category or tag is no longer associated with a post. Deleting the category or tag from the master list does prevent the soft 404.

    I would prefer to be able to turn this soft 404 behavior off completely. Any ideas?

    For now I’ll just have to remember to go in and delete unused categories and tags every time I delete a post that has unique categories or tags.

    Also, you can’t delete the “uncategorized” category. So that’s continuing to cause the soft 404 error in Google Webmaster Tools.

    I just ran into the same problem with some unused tags.

    Here’s a hack that will force the 404 template to be used and returns a 404 header: https://wordpress.stackexchange.com/questions/46116/non-existing-blog-pages-are-not-redirected-to-404

    I didn’t use it, but it seems straightforward enough.

    By the by, Uncategorized can be renamed and made useful, but it will still have uncategorized behaviour, ie: if you forget to choose a category, that category will be chosen for you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Prevent soft 404 errors (force 404 http response)’ is closed to new replies.