WordPress and the real 404 Error
What seems to be the trouble?
- 404 errors are not in my server statistics (produced by analog 6.0.)
- An attempt to manually remove a deleted post from Google’s index has failed.
And so, I’m guessing that wordpress does not really give out a true 404 error, when content has been moved or deleted.
I’m a writer, and so I have those moments when I decide that something I’ve written is terrible, so I might change it completely, with a new title and everything, or I might delete it, and pray that no one should ever come looking for it again.
…Sometimes people do come looking for it again. This is where WordPress’ 404 handling comes in handy, kinda.
I read this page: http://codex.wordpress.org/Creating_an_Error_404_Page
and I took this advice:
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.
<?php header("HTTP/1.1 404 Not Found"); ?>
After doing that, there is still soemthing fishy about the 404 behavior. The two points I mentioned above, they are still in effect.
I tried to address the first point by installing the plugin called Log 404. This makes a seperate log, and these 404 results do not show up in my server log.
I wondered if I was getting a “true 404” header response, so I checked it via the Check Server Headers Tool – HTTP Status Codes Checker. It says I do have a real 404, thanks to the php header line.
But the Google removal came back denied. Is this because there’s content on the page that shows, even on a deleted posts’ address? I deleted everything on 404.php except for that php header stuff. Will that help? Still no results in the log.
- The topic ‘WordPress and the real 404 Error’ is closed to new replies.