We moved an application to a different server and turned off the site in IIS on the old server. It looks like there are still web crawlers (Googlebot, Baidu, etc.) that are trying on the old IP address, so they get a 404 error. We would prefer them to get a 503 error so that they will try again later, which will give the DNS more time to propagate. Is there an easy/straightforward way to do this with IIS6?

link|improve this question

feedback

1 Answer

up vote 0 down vote accepted

You could create a "catch-all" page and add the following asp code:

context.context.Response.StatusCode =
(int)HttpStatusCode.ServiceUnavailable;
link|improve this answer
Turns out they were accessing it by IP. I set up a slightly more complicated script that would issue appropriate 301 redirects to the correct site by name instead of IP address. – yakatz Jan 17 at 22:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.