Websites provide a lot of web pages with different URLs but there are some defacto pages that exist most of the web sites.
index.html is one of them. index.html is used as the main or entrance page for the whole web site or web application.
What Is index.html?
As its name suggests index.html consists of two words
http://www.poftut.com is requested by default index.html file is returned.
What Contains index.html?
https://www.apachefriends.org/index.html. This is the main page of the
apachefriends.org which contains content like text, header, video, menus, categories, links etc.
index.html Basic Structure
When we look at an index.html file we can see that there is some basic structure that is mostly used in most of the web site’s other pages.
- `Menu` will contain shortcuts to other pages of the sites.
- `Main Content` generally contains information about the web site and some latest or generic or definitive information about the web site.
- `Footer` may contain some social media link, contact information, copyright information, etc.
Location Of The index.html
The index.html file is stored inside the web site root directory of the webserver. If the webserver is Apache2 the default path is
/var/www and the web site folder name. If the webserver is IIS the path will be
C:\inetpub\sites by default but change according to specific web site configuration.
index.html vs index.htm
Well, we can see some minor changes in the usage of the index.html web page.
index.html was popular a long time ago. Currently, most of the web sites prefer
index.php or nothing where index.html is not used. But there are some alternatives that are mostly used with dynamic server-side applications or sites like PHP , Python, ASP.NET, etc.
- `index.asp` is used by ASP.NET web sites or web applications.
- `index.php` is used by PHP web applications.
- `default.html` or `home.html` are also alternatives to the index.html.