Knowledge Essentials - 3Essentials Hosting

Default Document and Default Document Search Order settings

Article ID: 227

 Back to Search

To understand Default Document settings and default document search order, it's best to start with a brief explanation of how the webserver handles requests...

A website visitor types in, the webserver is handed the request, and it uses the portion to determine which specific "site" it should access (remember, a given webserver will have many many websites, this portion of the URL not only locates the correct physical server, but then also which website on that server).  Once it locates the website, it looks for a file called "somefile.html" and sends that back to the website vistor to display in their browser.

Now, if a website vistor types in just , then which file is the webserver supposed to send to the visitor?  That's where the concept of a default document for a directory comes in.  If "default document" is enabled for a directory (which it is for all sites and directories by default on our servers), then the webserver will look for a "default" document... a page to serve up to the visitor when no specific page was requested.  To do this, it maintains a list of possible default document names, and searches the directory for these in order, and serves the first one it finds to the visitor.  And example is the best way to understand this:

  • Let's say on my website,, I have default documents enabled, and I have the following default documents listed as possible documents in the following search order:
    • index.html
    • index.htm
    • default.html
    • default.htm
  • Now, let's say my website contains BOTH a index.html file AND a default.html file...
  • When a visitor visits my site using, the webserver will serve the index.html file... because it looks for any of those files (in the order they are listed) and it serves the first one it finds.
  • Now if I simply deleted the index.html from my site - i.e., I deleted the actual file, and made no changes to my default document search order:
    • index.html
    • index.htm
    • default.html
    • default.htm
  • And I then refresh my browser which was pointed at, suddently, the default.html would be loaded... because that's the first file the webserver finds when searching in order for default documents.
  • Another important example.... Let's say my website has the following list of default documents:
    • index.html
    • index.htm
    • default.html
    • default.htm
    • default.asp
  • And let's say I have these actual files on my website:
    • index.asp
    • contact.asp
    • services.asp
    • products.asp
  • When someone visits, which file will they be served? 
    • ANSWER: nothing, they will get a 404: File Not Found error. 
    • WHY? Because the webserver looked in the directory for each of the default documents, and none of those were present... I designed my site to use "index.asp" as the default/home page, but I didn't update the default document list to search for index.asp.  So, unless someone visits, they won't ever get my index.asp page (until I change the document list).

To find these settings in the control panel:

  • log into the control panel
  • click on your domain name
  • then click on WebDirectories, "webdirectories" is basically Plesk's access to IIS's "virtual directories" settings
  • when you click on the webdirectories icon, you are in the "root", note at the top, it says "Web Directory /".  The "/"symbol signifies the "root" of the website.
  • click the "preferences" icon (the preferences of the "root" directory)
  • there you will find options for changing the default documents, and the order in which it looks for them
Downloads Associated With This Article
No downloads are currently associated with this article.