Page is a not externally linkable
- Google
-- Google SEO News and Discussion
---- Hacked website - recovering from Google SEO perspective?


TheMadScientist - 1:05 am on Nov 2, 2012 (gmt 0)


If you don't already have a 503 solution...

### # ###

In the .htaccess file:

RewriteEngine on
RewriteRule .? /serve-503-error.php [L]

OR

In a faster / better place, the httpd.conf file:

RewriteEngine on
RewriteRule . /serve-503-error.php [L]

### # ###

The error header must go at the top of /serve-503-error.php, meaning before any other output (even a space) is sent to the requesting user-agent ... You can run some code before sending the error, but cannot send any output until after the error is served, so the header() lines should go as close to the top of the page as possible.

<serve-503-error.php-below>

<?php

header('HTTP/1.1 503 Service Unavailable');
header('Retry-Afer: '.(86400*DAYS));

### Some more php code to run down here, such as tracking URLs requested and things along those lines.

### Replace DAYS above with the number of days to Retry-After. I would personally go with 7 to 14 in this case, depending on how fast you think you can put things back together a bit. You can always shorten it up later if you get moving along faster.

### There's other ways to code the number to retry-after, but the above is simple to edit.

### The reason I suggest doing it with the internal redirect is you have a bunch of control over things and a ton of flexibility once you get everything running through a separate 503 page, such as, when you add back a few URLs you'll be able to easily check and see if the URL exists and if it does serve the info without the 503 error, otherwise continue serving the 503 error for that URL.

?>

<!-- A Really Cool HTML Page Here for Visitors to See -->

</serve-503-error.php-above>

NOTE: Edited a few times ... Coding off the top of my head without really knowing the entire setup for the site in the future or all the details of the situation I'd want to actually code a solution ... The above should work and be solid, but is it the absolute best in this specific situation? Can't say for sure, but it should be close IMO.


Thread source:: http://www.webmasterworld.com/google/4514373.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com