Google Webmaster Tools and 404 returns 200 code.
When you try to verify your site with Google Webmaster Tools, so that they will index your sitemap, you get the error:
Verification status: NOT VERIFIED
We’ve detected that your 404 (file not found) error page returns a status of 200 (Success) in the header.
Solution:
When Google checks your 404 page, it expects to get a 404 response. If you have an actual page there, such as your home page, it will get a 200 (Success) response, and fail. So, you need a real 404 page, and it needs to send a 404 response. Here is how to set that up.
- Create an actual 404, page not found document, as opposed to using your home page. This can be a simple HTML page, named something like 404.html, which tells the user that the page they requested cannot be found.
404 Page Examples: Examples from SmashingMagazine.com
- At the top of the 404 page, add the following code:
<?php
header(”HTTP/1.0 404 Not Found”);
?> - Login to your GoTryTHIS dashboard, go to the “Management” page, “Domains” tab, select the domain, and in the settings change the error document to point to the page you created in step 1.