A Site Structure Pattern from
Patterns for Personal Web Sites

Default Page

When a Web server receives a request for a URL that resolves to a directory, it will return that directory's default page if one exists. If one doesn't, many servers return a listing of the directory's contents, which can expose files and directories that are not intended to be public. It also exposes the site's guts to visitors, making the site appear unfinished.

Therefore, ensure that each directory on your site has a default page.

The default page name varies from server to server. The most common is index.html; other names include default.html and home.html. Check with the manager of your Web server if you're unsure of its default page name.

Depending on its configuration & capabilities, your Web server may give you alternatives to putting a default page in each directory:

  1. The Web server may be set to return an error message (most likely HTTP status code 403, Forbidden) if a default page isn't found.

  2. Rather than creating a default Web page as a file, you may be able to create a symbolic link to another page (e.g., your site's home page, or an error page).



Last updated 17 June 2002
http://www.rdrop.com/~half/Creations/Writings/Web.patterns/default.page.html
All contents ©2002 Mark L. Irons