How to set default page in IIS7

This Windows 2008 hosting guide explains how to set default page in IIS7.

Best Web Hosting

Default documents are enabled by default, and IIS 7 defines the following default document files:

  • Default.aspx
  • Default.htm
  • Default.asp
  • Index.htm
  • Index.html
  • Iisstart.htm

Add default page using IIS7 Manager

1.Open IIS Manager.
2.In the Connections pane, expand the server name, expand Sites, and then navigate to the Web site or application where you want to configure default documents.
3.In the Home pane, double-click Default Document.
4.In the Actions pane, click Add.
5.In the Add Default Document dialog box, type the name of the default document that you want to add, and then click OK.

Add default page using Web.config file

In the web.config file of your site, you should place the <defaultDocument> section:

<configuration>
   <system.webServer>
      <defaultDocument enabled=”true”>
         <files>
            <add value=”mydefaultpage.aspx” />
         </files>
      </defaultDocument>
   </system.webServer>
</configuration>