Cannot verify with google, 200 Ok “error”
-
Ive searched google and these forums, and found a few answers to this problem, none work for me.
WordPress returns a 200 Ok repsonse instead of a 404 not found response if you put in a wrong url. Google doesn’t allow this.
ive found two fixes, neither worked. One said to put
<?php if (!have_posts()) { header(‘HTTP/1.0 404 Not Found’); } ?>
as the very first line in the header.
The other said to put:
<?php header(“HTTP/1.1 404 Not Found”); ?>
Into the 404.php file.
Then a third solution i found stated that the problem is created if you install wordpress into a subdirectory, and to move your files to the root dir. Did that, still no help.
(side note: the 404.php file is different in size on the server than it is on my home pc, which i thought was because i added the new line of text, but when i overwrite, it still shows as a slightly smaller size on the server. i can download it again, overwrite the local version with the server version… the new line is there, but still the data size is smaller on the server.)
Can anyone help?
I also tried adding the meta tag to the header file. When i view the header file, the meta tag is there, but when i view source on my page it isnt, and i cant verify my site with google, they say the meta tag isnt there.
I know html, but not php. :/
site is http://www.dontfearthetruth.com
Thanks in advance to anyone who can help.
- The topic ‘Cannot verify with google, 200 Ok “error”’ is closed to new replies.