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!

VN:F [1.9.22_1171]
Rating: 8.8/10 (4 votes cast)

About Crew

Our business is centered on bringing enterprise-class strategy, support, and security to your hosted or managed platforms no matter where you choose to deploy your environment. We specialize in providing managed services, cyber security, and expert, USA-based, 24/7 Absolute SupportĀ® on-premises, or in any cloud.
This entry was posted in SharePoint Tips & Tricks and tagged , , , , , , , , , , . Bookmark the permalink.

6 Responses to How to Restore a Deleted SharePoint IIS Site

  1. Joel Plaut says:

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


  2. Great tip. Keep walking, Joe.

    Actually its configuration is available for restore.


  3. Ivan says:

    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 says:

    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 says:

    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 says:

    This is amazing saved my huge effort. kudos to you

Leave a Reply

Your email address will not be published. Required fields are marked *

Let's make sure you're human first: *