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 trialhamza shaikh
5,875 Pointswhy is it important that we name the main file index.html ?
will it not work the same if i name it something else
2 Answers
Steven Parker
231,248 PointsWhen a connection is made to a web site without specifying a specific file in the URL, most servers return a default page. This page is known as the "landing page" and most servers will provide by default a file named "index.html" Thus, a connection made to "http://mysite.com" turns into "http://mysite.com/index.html".
Generally, a server can be configured to use a different file file as a landing page if desired, but "index.html" is the most common and typically the name used unless the developer or administrator has a reason to configure the server otherwise.
Simon Sørensen
17,304 PointsBecause that's the file name the server sees as an index file.
Simon Sørensen
17,304 PointsSimon Sørensen
17,304 PointsYeah
Rikky Yoelanda Putra
2,317 PointsRikky Yoelanda Putra
2,317 PointsI'll include an addition to this comment. There are three (3) default page known by most web servers, they are index.html and index.htm that already well-known, and also default.htm on some windows servers. As long as you use one of those three names, that will be considered as your main page.