Google Sitemap error


I’m trying to use google sitemaps and I get the following message about my web site:

We’ve detected that your 404 (file not found) error page returns a status of 200 (OK) in the header.
This configuration presents a security risk for site verification and therefore, we can’t verify your site. If your web server is configured to return a status of 200 in the header of 404 pages, and we enabled you to verify your site with this configuration, others would be able to take advantage of this and verify your site as well. This would allow others to see your site statistics. To ensure that no one can take advantage of this configuration to view statistics to sites they don’t own, we only verify sites that return a status of 404 in the header of 404 pages.

Please modify your web server configuration to return a status of 404 in the header of 404 pages. Note that we do a HEAD request (and not a GET request) when we check for this. Once your web server is configured correctly, try to verify the site again. If your web server is configured this way and you receive this error, click Check Status again and we’ll recheck your configuration.

How to I fix this?


Are you using custom error pages?


Yes, I one custom error page to handle 404’s and a modification to my htaccess file pointing it in the right direction. I also have header code in the missing.php file that I created so it should be telling the search engine its a 404 -

<?php header("HTTP/1.0 404 Not Found"); ?>

I test it with some online tools and it responds that it is 404 but I log into google sitemaps and it is responding 200 OK when I try to verify.

Does anyone know how to do a manual HEADER request instead of a GET request so that I can test this another way? I not sure how the online tools webpages are requesting the header information.


You might try completely turning off custom error page and try again.