WordPress custom theme’s 404.php > Does Google see it as a true 404 redirect?

WordPress allows theme designers to place a 404.php file in their theme’s directory. This enables you to provide a custom page content when the WordPress application forwards the 404 over to your 404.php page.

My question is this: Does this constitute a true 404 error that would be registered as such by Google and other crawlers, or does the fact that WordPress intercepts the request and passes it to the physical 404.php page mean that no true 404 has occurred?

Related posts

Leave a Reply

4 comments

  1. WordPress’s default page does not seem send a 404 header, which is required to signal a missing page to a crawler. From WordPress Codex: Creating an error page:

    Tips for Error Pages

    There are various improvements you can make to your 404 Error web pages so let’s look at some of your options.

    Sending Proper Headers

    By default, WordPress continues to send 404 pages as if they were fine. To make search engines like Google spider these pages correctly, you can add this line to the top of your theme’s 404.php file.

    However, directly beneath that is a line saying “this is no longer necessary in the latest versions of WordPress”, whatever that means. You may still want to check whether the 404 page sends any headers using Firefox’s Web Developer Extension or Firebug.

  2. I suggest looking at the headers for the page using the Firebug Net tab, or the Firefox Live HTTP Headers add on. If your server sends HTTP 200, it will be seen as a normal page of course. Using one of these tools, you’ll be able to see whether it is indeed sending a 404 status code for the page.