Saw an interesting hacked site earlier today, and figured I'd write up a little article on it, as I didn't find much online about this issue and thought it may help others. So, what do you do if your site is definitely there, but Google Webmaster Tools is reporting 404 errors? (This means that your site is definitely live and working, but Google seems to think that it isn't there.)
Well, the cause could well be a number of oddball things. So, no guarantees that this will be your saving grace. But, I will offer up one thing you can check on for sure. So, when Google visits your site, it does so electronically via a bot, which is a little different than when you or I look at it. We type in www.YourSite.com, and view it in the browser window. All looks a-okay, right? So, how could Google be unable to see it?
If your site was ever, or recently, hacked, there could be some remnants leftover from the hack that you didn't necessarily find. Here's an example from a site I was looking at this morning, which had gone from thousands of hits per day down to practically zero. It had *completely disappeared* from Google's listings, in fact! What the hackers had done in this case was insert a redirect into the .htaccess file. The redirect would only kick in if the "visitor" was a bot like Google, Bing, MSN, etc. (and a few select others). The hacked portion of the .htaccess file looked like this:
So, if you or I visited the site, all looked fine. But, if Google, Bing, or the other bots named in that script visited, they would be redirected to a malicious file. Now, initially (before the hack was discovered), this was no-doubt disastrous for SEO, as Google and other bots are pretty smart and can recognize malicious or spam content. But, after the hack was repaired, this lingering remnant was also awful for SEO because those bots were being redirected to a file that was no longer present on the system. Thus, the 404 "file not found" error. A few days of this, and Google assumes your site is gone / dead / history. Links in to your site stop showing up, traffic plummets. Pretty awful stuff.
Ergo, if your site was hacked recently, and your traffic is not picking back up, it may be worth a look at your .htaccess file, if you have one. There could be other causes to your troubles, still, but this may help some.