Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Adding Pages to a Website Add a New Page

Must the homepage be named index.htm?

I know index.htm is usually recognized this as the homepage, but does it have to be index? I only ask because I have a different websites for each Treehouse course. I have the folders clearly labeled, but I didn't want to take a chance of getting the homepages for each site mixed up (by naming all of them index.htm). Right now my homepage is HTMAW0.htm, and my about page is HTMAW1.htm. Is this an ok practice, or should the homepage always be index.htm?

Also, is there any difference between the extensions .htm & .html?

1 Answer

Steven Parker
Steven Parker
216,148 Points

The homepage is usually named index.html (or .htm) because that is typically the default file delivered by a web server. If you have access to the server's configuration, you can pick the name of the file you want as the default if you want something different.

You can always load a file other than the default by adding its name after the website URL in your browser, assuming that is not prohibited by the server security settings.

And while .html is the normal extension to indicate a file containing HTML code, it is sometimes abbreviated to .htm for systems which have a 3-character file extension limit (or as a legacy for those that had such limits in older versions).

cool, thanks.