We have an upgrade to an application coming up which requires a site collection to be deleted and recreated. In terms of managing the existing users experience during upgrade what would be the best practice for redirecting requests for that site collection to a holding/maintenance page?

If it is under the root managed path of a web application would you just change IIS settings to redirect to a different URL?

If it is under another managed path within the web application then how could this best be managed?

5 Answers 5


If all requests go through a proxy server, and your proxy server supports this, create a rule that redirects all traffic for the web application, not just the entire domain, to a new temporary web page.

You can also take the low tech route and announce the change to your users by email.

  • This is probably the solution we will go with, but I was hoping there might be some other BP out there. Apr 16, 2010 at 12:29
  • Accepted as the answer, as it is the approach we are having to take. Though I am leaning more to Steve's concept as architecturally the right way forward. Apr 16, 2010 at 19:26

Or another option is to create a simple html page called App_Offline.htm and put it in the root of the virtual directory. No matter what page is hit, this page gets rendered. When you're done simply delete/nename it. I've only done this before for ASP.NET but it should work for SharePoint as it is build on top off asp.net. Must be .net 2.0 though.

Now if you have a heap of web front ends then this wont be the best method.

Check out Scott Guthrie's blog on this.

  • Good approach but as you pointed out not scalable across many WFEs Apr 16, 2010 at 12:31
  • Does this have any impact though? Can the PowerShell and C# SharePoint API commands still interact correctly with the URLs when there's an app_offline.htm file present? May 7, 2013 at 8:15

You could also temporarily change the DNS to point to another server during the upgrade process. Make sure that you lower the TTL of the DNS records so that you quickly can switch back.

  • This would work but we'd rather make the redirect at the reverse proxy level if we can. Apr 16, 2010 at 12:30
  • If you have a proxy in between its the way to go! Apr 16, 2010 at 13:42
  • This would be a problem for any other site collections hosted on that server. Charles' question only mentioned a single specific site collection. Apr 16, 2010 at 13:44
  • @Muhimbi Yea, I know. Consider it as a last resort.. Apr 16, 2010 at 21:38

I've always created a httpmodule for this.

  • This requires web.config modification AND assembly deployment though. Is there a reason you chose this over a redirect? Apr 16, 2010 at 12:33
  • 1
    I chose this because it gives me the most control over who, how, and why I redirect. It seems like your scenerio is only affecting a single site collection, so my thought would be to write a httpmodule that redirects only for that single site collection and then leave all the other site collections available. All of the above options seem to be taking down your complete sharepoint site. If your goal is to completely take down sharepoint during maintenance then I think the above options work well. If you only need to take down a subset of sharepoint, I think the httpmodule is the way to go. Apr 16, 2010 at 14:30
  • I addition to this, could you not package up the web.config mods into a feature (prob WebApplication scoped) which is activated before the upgrade and then de-activated after. that would take care of having to configure multiple front-ends individually
    – Paul Lucas
    Apr 16, 2010 at 15:18
  • Definitely Paul. Apr 16, 2010 at 16:27
  • There is a significant difference in the 'red tape' that is required to develop, test and deploy an additional code piece rather than have the infrastructure team configure reverse proxy settings. Though I agree that if this had been considered from the outset your approach would have allowed additional flexibility. Apr 16, 2010 at 19:21

We've been looking at doing something similar and have been looking at SPOffline from Codeplex http://spoffline.codeplex.com/

We haven't actually used it yet but it looks potentially useful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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