views:

81

answers:

3

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?

+2  A: 

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.

Alex JL
+4  A: 

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.

Pekka
Bit silly it wouldn't send the header by default...
alex
Firefox Live HTTP headers reports: HTTP/1.1 404 Not Found(I'm on Wordpress 2.9.2)
Scott B
+1  A: 

I can say that in the latest version of Wordpress, it does send a 404 status, so Google (and other crawlers) will treat it as a proper dead link.

pkaeding
As of 2.9.2 you are absolutely correct (not sure about previous versions). Can you suggest a workaround to avoid or override the 404 header?
Scott B