Home page naming conventions

When someone searches for your domain in a browser, the web server will automatically look in the public directory for an index file. It will search for specific files in this order: index.htm, index.html, index.shtml, index.phtml, index.php, index.php3 and index.wml. The server will return the first index file it finds, regardless of any other files you have. Therefore, it is best to keep only one index file in your public directory to avoid confusion. If your package does not include scripting, your page must be named index.htm or index.html.


If you want your home page to be titled differently from the above names, we recommend that you use the DirectoryIndex command in an .htaccess file. (This is not an option if your package does not include scripting.) Alternatively, you can use a redirection script.




DirectoryIndex command in an .htaccess file


If you do not have website security enabled, create a file called .htaccess in your public directory. If you are already using an .htaccess file for website security, you should edit the existing file rather than creating a new one. Add the DirectoryIndex command AFTER the existing information, not before. The DirectoryIndex command in your .htaccess file should list the filenames that you would like a browser to look for in the order that you would like them to be used, separated by spaces.  An actual command

line might look something like this:


DirectoryIndex index.html index.asp default.asp default.html


In this case, a browser would look for an index.html file first, then index.asp, then default.asp, then default.html. This .htaccess file will be applied to every subdirectory of the directory it is placed in, so be sure to include any filenames that you are likely

to use.




Redirection Scripts


You can also use one of the following scripts to load your home page. The scripts are supplied in javascript and meta tag versions.


To use one of the scripts, place your home page file in your public directory. Create a file called index.html (also in your public directory) and copy one of the scripts below into it. In the script, change default.htm to the name of your home page file and www.yourname.com to your domain (in the meta tag version). When index.html is accessed, it will instantly redirect a browser to your home page file.


Javascript Redirection script


<script language="javascript">

//redirect to default.htm

function goNow() {





<body bgcolor=#FFFFFF text=#000000 onload="goNow()">


Meta tag Redirection script


<meta http-equiv="refresh"