Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSiddharth Pande
9,046 PointsIf we have more than one html pages in the root directory then how does the browser know to read and open index.html
If we have more than one html pages in the root directory then how does the browser know to read and open index.html before reading and opening any other html page?
1 Answer
Steven Parker
231,269 PointsIt's the server, not the browser, that makes this determination. When the browser request does not specify a particular file, the server's configuration contains a list of default files to look for in the root directory. The first one found in the list is sent to the browser.
The name "index.html" is simply a convention, the server can be configured to use any desired file as the default landing page.
Siddharth Pande
9,046 PointsSiddharth Pande
9,046 PointsThanks for the answer