WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] http headers for 404s

[Resolved] http headers for 404s

  • When I get a 404 in a worpress (1.5) controlled page, WordPress gives the user the 404 template page, which is good, but it servers it as a 301 – moved permenetly.

    This means I can’t track 404s from the logs or with a auto-magical script (checkbot).

    Is there some php I can include in the 404 template that would send the correct http header?

Viewing 2 replies - 1 through 2 (of 2 total)
  • This still seems to affect WordPress 2, and it makes it more difficult to regerster with Google.

    Any ideas on how to fix this?

    -Alastair

    Adding this to the top of the 404 template seems to work:
    <?php header("HTTP/1.0 404 Not Found"); ?>

    Are there any problems with this approach?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] http headers for 404s’ is closed to new replies.
Skip to toolbar