How to remove/delete SharePoint extended site placed in different zones

Well as we know that we can extend a SharePoint site for different zone other than default with different port number and host header. In extended site creation, a new site creates on IIS pointing to a new virtual directory on server. This new virtual directory has its own web.config file for extended site. But extended site points to same content db as the original site has. Therefore end user access same contents through different site urls depending upon the permission set on individual sites. In short you can say that extended site is a replica of its original site as both sites serve from same content db.

Now you want to remove/delete an extended web site from SharePoint server. What to do as extended site doesn’t show in “web application list” and in “Delete Web application”. Well no probes as I mentioned earlier that when we extend a web application it just create a site in IIS and point to existing site content database. So if we remove it from IIS and delete the virtual directory created by extended site then it should remove and delete from SharePoint server. But that’s a manually part and in this case we can miss some references. So here is the best practice for that:

  • Open Central Administration and go to Application Management tab.
  • Under “SharePoint Web Application Management” section, click on “Remove SharePoint from IIS Web site” link.
  • Select the actual web application from which you create extended site.
  • Under “Select IIS Web site and zone to remove” drop down list, expand the drop down by clicking the arrow button.
  • Here you will get all the extended sites with their zones including the actual website (Always created in Default Zone).
  • Select the extended site that you want to remove.
  • Under “Delete IIS Web sites”, check the Yes radio button and click OK.
  • Wait for processing and after completing the process you are done.