Subscribe to Windows IT Pro
November 12, 2001 12:00 AM

Removing the Default Web Site

Windows IT Pro
InstantDoc ID #22968
Rating: (0)

Several references recommend removing the Default Web Site for security reasons. The only reason I can see is because of the default virtual directories and default permissions that exist on the Default Web Site. Is this step beneficial even if I already follow best practices such as removing unneeded content and directories and setting custom permissions?

Removing the Default Web Site is good advice but not necessary in all cases. I advise most IIS administrators to turn off the Default Web Site. If, however, the Web server is connected to the Internet, I recommend removing the Default Web Site and underlying content.

The case for keeping the Default Web site is that a time might arise when you need the online documentation. In addition, Microsoft tends to depend on the Default Web Site for installing software such as Microsoft Proxy Server 2.x and the IIS Migration Wizard. However, if you keep the site, I recommend that you not use it for content and disable it. If you want to use the Default Web Site for content, you need to remove all the built-in virtual directories and provided files. Consequently, you might as well start a new Web site and leave the Default Web Site turned off.

By default, the Default Web Site's home folder is \%systemroot%\www root\inetpub. When you create new Web sites, the logical home directory for those new Web sites is the \inetpub folder. However, by placing these new sites in the \inetpub folder, you make the new Web sites' content available from the Default Web Site. Figure 4 shows a typical setup in which a new Web site resides in the \inetpub folder. As you can see, an intruder can access the new Web site as either http:// securityadministrator.com or http://iisadministrator.com/newsite. The best way to avoid this potential security hole is to place all your content in a new \wwwroot folder outside \inetpub (and off the system drive). The only other way to avoid the hole is to delete or disable the Default Web Site.

Related Content:

ARTICLE TOOLS

Comments
  • Devcom admin
    10 years ago
    Dec 22, 2002

    Additionally I would note that such packages as MS Commerce Server and Exchange Server install "widgets" (client side controls) on Default Site. So removing default web site is not recommended

  • Mike Blaszkowski
    10 years ago
    Dec 09, 2002

    I strongly recommend *not* deleting the default site. It is best to disable it. As Jim states, many third party software rely on it as well as many Microsoft products. But the real clincher is if you delete it, then create a new website; the new web site will use Index 1 (the first available index now that you've deleted the default). Here's where things get interesting: The new web site, which has now inherited the old default site index, will rebuild the entire directory structure the default site had. Why? Because the information stored for the default site is not only in the metabase (which does get deleted when you delete the default site) but is also in the registry under hklm\\currentcontrolset\\services\\w3svc\\parameters\\virtualroots. When you delete the site, the info in the registry does not get deleted. When you create a new site that inherits Index 1, it will create the site with all the virtual directories listed in this registry key. And don't think you can just delete all the information in the registry. If you delete the "/" end key (which points to the web root location) you may get an error starting IIS. In my experience this error will only occur if you delete the default site while having no other web sites defined. Also, if you delete the default site, do not delete the registry entries, *and* do not have other sites defined; when you restart the IIS services, the default site will re-create itself automatically using these registry values. On a last note; any new virtual directories that get created under the default site (index 1) get written to both the metabase and the registry.

  • Jim
    11 years ago
    Dec 12, 2001

    I concer that all the default virtual directories and files should be removed, maybe even move the defaul location of the site. But I never remove the default web site and I never put site content in it. I have found some 3rd party softwares that look for the default web site to place there interface directories there. I always recommend locking down the default web site with a port change and IP Restrictions and if possible SSL. Then stop the site till needed.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.