IamCalvinBrown.com a Blog Site

Code Examples, Consulting Advice and lots of other cool things

Setting the default page in web.config


Google wants the first page of websites to work with a simple / . To enable your site to be search friendly it's always best to set the default page that you site will render. Below is an example of how to do this:


<system.webServer>
      <defaultDocument enabled="true">    <!-- this line enables default documents for a directory -->
         <files>      
            <clear/>     <!-- removes the existing default document list -->                
            <add value="login.aspx"/>     <!-- login.aspx is now the default document  -->                
            <add value="index.aspx"/>     <!-- 2nd default document in search order -->                
            <add value="iamcalvinbrown.aspx/>     <!-- 3rd default document in search order -->
         </files>
      </defaultDocument>
      <modules runAllManagedModulesForAllRequests="true"/>
   </system.webServer>

Comments (1) -

  • lPaXgeRJyksOY

    3/14/2019 8:06:44 PM |

    264102 446443There is evidently a whole lot to know about this.  I consider you created certain good points in capabilities also. 389510

Loading