Webserver directory index
Encyclopedia
Index.html redirects here. For Wikipedia's default home page, go to Main Page
Main Page
__NOTOC____NOEDITSECTION__...

.


When an HTTP client (generally a Web browser
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...

) requests a URL
Uniform Resource Locator
In computing, a uniform resource locator or universal resource locator is a specific character string that constitutes a reference to an Internet resource....

 that points to a directory
Directory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...

 structure instead of an actual Web page within the directory, the Web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

 will generally serve a general page, which is often referred to as a main or "index" page.

index.html is the traditional filename for such a page, but most modern HTTP servers offer a configurable list of filenames that the server can use as an index. If a server is configured to support server-side scripting
Server-side scripting
Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the web server to generate dynamic web pages. It is usually used to provide interactive web sites that interface to databases or other data stores. This is different from...

, the list will usually include entries allowing dynamic content to be used as the index page (e.g. index.php
PHP
PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document...

, index.shtml, default.asp
Active Server Pages
Active Server Pages , also known as Classic ASP or ASP Classic, was Microsoft's first server-side script engine for dynamically-generated Web pages. Initially released as an add-on to Internet Information Services via the Windows NT 4.0 Option Pack Active Server Pages (ASP), also known as Classic...

) even though it may be more appropriate to still specify the html output (index.html.php or index.html.aspx), as this should not be taken for granted. An example is the popular open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 web server Apache
Apache HTTP Server
The Apache HTTP Server, commonly referred to as Apache , is web server software notable for playing a key role in the initial growth of the World Wide Web. In 2009 it became the first web server software to surpass the 100 million website milestone...

, where the list of filenames is controlled by the DirectoryIndex directive in the main server configuration file or in the configuration file for that directory
.htaccess
A .htaccess file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration....

. It is possible to make do without file extensions at all, and be neutral to content delivery methods, and set the server to automatically pick the best file through content negotiation
Content negotiation
Content negotiation is a mechanism defined in the HTTP specification that makes it possible to serve different versions of a document at the same URI, so that user agents can specify which version fit their capabilities the best...

.

If the server is unable to find a file with any of the names listed in its configuration, it may either return an error (generally 404 Not Found
HTTP 404
The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested. A 404 error should not be confused with "server not found" or similar errors, in which a connection to the...

) or generate its own index page listing the files in the directory. It may also return a 403 Index Listing Forbidden
HTTP 403
In the HTTP protocol used on the World Wide Web, 403 Forbidden is an HTTP status code returned by a web server when a user requests a web page or media that the server does not allow them to. In other words, the server can be reached, but the server declined to allow access to the page. This...

. Usually this option is also configurable.

Entrance

Since the index page is often the first page of a Web site that a user sees, it is sometimes used to offer a menu of language options
Internationalization and localization
In computing, internationalization and localization are means of adapting computer software to different languages, regional differences and technical requirements of a target market...

 for large Web sites that use geo targeting
Geo targeting
Geo targeting in geomarketing and internet marketing is the method of determining the geolocation of a website visitor and delivering different content to that visitor based on his or her location, such as country, region/state, city, metro code/zip code, organization, IP address, ISP or other...

. It is also possible to avoid this step, for example by using content negotiation
Content negotiation
Content negotiation is a mechanism defined in the HTTP specification that makes it possible to serve different versions of a document at the same URI, so that user agents can specify which version fit their capabilities the best...

.

See also

  • Homepage
    Homepage
    A home page or homepage has various related meanings to do with web sites:* It most often refers to the initial or main web page of a web site, sometimes called the front page ....

  • Apache API for mod_rewrite
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK