How to show maintenance page during deployment?

ronaldwidha picture ronaldwidha · May 4, 2009 · Viewed 21.3k times · Source

I want to plan a schedule maintenance down time on one of my production asp.net website hosted on IIS windows server 2003.

I think this is the preferred behavior:

  1. All request to http://www.x.com including www.x.com/asb/asd/ will be redirected to a notification page (site is currently down. come back later)
  2. The maintenance will take around an hour. how do I ensure for having this redirection to maintenance page to have the least impact to SEO/google ranking
  3. Preferrably I want to be able to quietly test the production site before it goes back 'live'
  4. Preferrably I dont want to rely on pointing DNS elsewhere.
  5. To make it simple please pretend that I don't have any other hardware in front of the web servers (i.e load balancer, firewall etc)

An idea would be:

  1. to create another app on the same web server
  2. create httpmodule or httphandler to handle any url request and 302 redirect them to the maintenance page

Thanks

Answer

Anton Gogolev picture Anton Gogolev · May 4, 2009

Try putting App_Offline.htm to the root directory.