How do I change the default document on my Windows/IIS site?


You can change the default index file for your site defaulted to Windows/IIS by using a web.config file with the following:

 
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                    <add value="index.html" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

If you have Index.aspx in your content folder as well as Default.aspx, Index.aspx will load first. The order in which document will load first is indicated below:

iisstart.htm

index.aspx

index.asp

index.html

index.htm

default.aspx

default.asp

default.html

default.htm



Was this content helpful?




© 2014 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER