Share via


Default Document

 

Applies To: Windows Server 2012 R2, Windows Server 2012

Use the Default Document feature page to configure the list of default documents. If a user accesses your site or application without specifying a document name (for example, by requesting https://www.contoso.com/ instead of https://www.contoso.com/Default.htm), you can configure IIS to serve a default document such as Default.htm. IIS returns the first default document in the list that matches a file name in the directory.

Note

To improve performance, make sure that the first default document in the list exists on disk and that it is the first file name in the list.

Related scenarios

In this document

  1. UI Elements Default Documents

  2. Add Default Document Dialog Box

UI Elements Default Documents

The following tables describe the UI elements that are available on the feature page and in the Actions pane.

Feature Page Elements

Element Name

Description

Name

Displays the file name that is added as a default document.

Entry Type

Displays whether the item is local or inherited. Local items are read from the current configuration file, and inherited items are read from a parent configuration file.

Actions Pane Elements

Element Name

Description

Add

Opens the Add Default Document dialog box in which you can add a file name to the default document list.

Remove

Removes the item that is selected from the list on the feature page.

Move Up

Moves up a selected item in the list.

Note

When items in the list are reordered at a child level, the child will no longer inherit settings from the parent level. This loss of inheritance includes any items that are added to or removed from the list at the parent level. If you want to inherit settings from a parent level, revert all changes at the child level by using the Revert to Inherited action in the Actions pane.

Move Down

Moves a selected item down in the list.

Note

When items in the list are reordered at a child level, the child will no longer inherit settings from the parent level. This loss of inheritance includes any items that are added to or removed from the list at the parent level. If you want to inherit settings from a parent level, revert all changes at the child level by using the Revert to Inherited action in the Actions pane.

Disable

Disables the Default Documents feature. When default documents are disabled, and a user accesses your site or application without specifying a document name, client browsers receive a 403—Forbidden error. This error is returned because the web server cannot determine which file to serve, and the client cannot view the contents of the directory.

Note

If the Default Documents feature is disabled but the Directory Browsing feature is enabled, client browsers receive a directory listing instead of a 403—Forbidden error.

Enable

Enables the Default Documents feature.

Revert to Inherited

Reverts the feature to inherit settings from the parent configuration. This action deletes local configuration settings, including items from the list, for this feature. This action is not available at the server level.

Add Default Document Dialog Box

Use the Add Default Document feature page to add a file name to the list of default documents.

Element Name

Description

Name

Type the file name or relative path that you want to add to the list of default documents. This value is added to the beginning of this list.