Google webmaster tools refuse to verify a Wordpress blog

Google webmaster tools will not verify a site by the file upload method if it does not return a proper 404 code on missing pages. With Wordpress and permalinks enabled, everything is redirected to index.php, which does exist and unless the PHP code itself overrides the return code, the response would be 200.
The solution is to simply edit headers.php in the theme and add the following to the beginning of the file:
if (is_404()) { header('HTTP/1.1 404 Not Found'); } ?>


Popular posts from this blog

LVM metadata corruption