Google's Webmaster Tools is hammering on me to send out proper 404 signals instead of "soft 404s". I found the page generating the errors. I have a website where users create images and the errors appear when Google tries to access images that no longer exist. It seems the developer who coded it had prepared a message in the code for when this happens, but Google is not happy because it is not a proper 404. So, in the middle of the page there's something like this:
if ($empty_page) {
echo 'The image you are trying to view is no longer available.';
} else {....renders content...
After Googling the issue, I tried something like this:
if ($empty_page) {
header( "HTTP/1.1 404 Not Found" );
echo 'The image you are trying to view is no longer available.';
} else {....renders content...
That doesn't work.. I don't think? People keep saying that it will generate a header, so I look at the code of the page that gets generated but I don't see '404' anywhere in the code. Is that where it would be? Please help.. I am so lost >_<
Is this a 404 anyway? Should it be a 410 maybe?