How to Restore a Deleted SharePoint IIS Site

Has your SharePoint site gone missing from IIS Server altogether? In this tutorial, SharePoint Engineer Joe Beyer walks through the process of restoring a SharePoint site that has been deleted from IIS.

Just the other day, I was presented with an issue that I am actually surprised does not surface more often. The IIS site associated with my SharePoint site was accidentally deleted.

Now, I know if it were the Central Administration site, that we could re-provision that using psconfig.exe command(s). But it’s a little different for a missing SharePoint site.

I first realized the site was deleted when I was greeted with the following message when attempting to browse to said site:

browser screenshot: 404 - Site Not Found

Although the site is no longer visible though IIS, the Virtual Directory path (%SystemRoot%/inetpub/wwwroot/wss/VirtualDirectories/) still remains in the file system. I attempted to add a new site via IIS by using the same name and pointing to the Virtual Directory as shown here:

screenshot: Add Web Site alert box in IIS

Once the new site was created, I attempted to browse to the site once again and received an HTTP 404 error. Once this failed, I deleted the newly created IIS site to continue further troubleshooting. At this time, I started thinking that an environment restore would be necessary. Wanting to avoid a restore at all costs, I decided to attempt to extend the Web Application using the same URL’s as the root site collection. This is all done through Central Administration.

*Before extending the Web Application, I went in to the virtual directory path and copied the respective path to create a backup copy.

  1. Browse to Central Administration > Application Management > Manage Web Applications.
  2. Highlight the appropriate Web Application and click on Extendlocated on the Ribbon bar:SharePoint screenshot: Extend Web Applications
  3. On the Extend Web Application to Another IIS Web Sitepage, enter the same name as the IIS site was previously. For Host Header, enter a unique value, but similar to the previous URL. For this example, these values are as follows:SharePoint screenshot: Extend Application to Another Site
  4. Click OK.

When this is complete, you should now be able to browse to the site. When extending the Web Application, SharePoint will attempt to locate the appropriate IIS site. If the site does not exist (which is the case here), it will recreate it.

IIS screenshot: Site Bindings alert box

Now that the IIS site exists once again, I can now successfully browse to the site and it appears just how I left it!

Screenshot of standard default SharePoint 2010 Site

Questions? Comments? Feel free to leave your thoughts below & I will try to respond quickly. Thanks for reading!

2012-08-07T03:02:28+00:00 August 7th, 2012|


  1. Joel Plaut August 8, 2012 at 8:49 am - Reply

    Wow, what a nightmare, this is a great tip for real-time recovery!


  2. Thuan Soldier August 9, 2012 at 1:29 am - Reply

    Great tip. Keep walking, Joe.

    Actually its configuration is available for restore.


  3. Ivan November 23, 2012 at 6:58 am - Reply

    A simpler solution would be to stop and restart the SharePoint Web Application Service. Also, this could be done through the object model:

  4. vimal singh September 21, 2015 at 5:44 am - Reply

    By mistaken the virtual directory folders has been deleted physically.
    Now we have re provisioned the central administration site.
    Is any way to restore site collections ?

    Vimal Singh

  5. bhashwar bhattarai November 18, 2015 at 4:02 pm - Reply

    Hello Joe,
    almost month ago after creating sharepoint 2013 apps it did not work. so in one of the article it told me to delete the default web application and create empty host header. after doing so my users could not open any sharepoint pages. after creating back end host connection and disabling loop back check in the registry the users were able to open the pages.
    someone told me that i will be in big trouble later in future. is there any big solution to handle this situation.
    Please help!!!

  6. samir July 12, 2016 at 3:15 pm - Reply

    This is amazing saved my huge effort. kudos to you

Leave A Comment