Image may be NSFW.
Clik here to view.If you are having problems getting Googles Sitemaps to verify your site Try modifying your theme as described by Christian Swanson:
If you use WordPress with a Google SiteMap Plugin and you tried to verify the ownership of your blog with Google, you’ve probably seen the error, “We’ve detected that your 404 (file not found) error page returns a status of 200 (OK) in the header.”
Google explains:
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.
So how do you fix it? My friend Carl Hoerth figured it out and it’s actually very easy:
- You find the header.php file in your chosen WordPress theme
- You rename the file header.old
- You open header.old in a text editor
- Insert a blank line one line above the line that reads something like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional…- Insert:
<?php if (!have_posts()) { header('HTTP/1.0 404 Not Found'); } ?>- Save this edited file as your new header.php
- Go to http://www.urltrends.com/httpheaderviewer.php and enter http://yourblog.com/page_not_there/ and confirm that your header comes back as HTTP/1.1 404 Not Found.
- Now you can go back to Google SiteMaps and verify your site.