1. Home
  2. Knowledge Base
  3. Website
  4. Website Tips
  5. What is a Directory Index? How to change directory index

What is a Directory Index? How to change directory index

The directory index is the first file the server loads and by default will be the index file within the document root of the domain (the public_html folder if it is your primary domain). Our servers always load the file called “index” if your domain is typed into the browser, first looking for index.htm, then index.html, and finally index.php. When your account is first created, we also place the default.htm file (the default “Hello There!” page) in your account that will load if no index files are found. If there is no index or default file in your folder, then the website will not load unless the directory index is modified.

Changing the directory index

Some website design applications will name the home page something other than index. For example, the application may name your homepage Welcome.html or Home.html. If your application does this, you will need to modify your site so that the directory index matches the name of your website’s first page. You can do this using a .htaccess file.

In the following example we will assume you want your domain to point to Welcome.html when it is visited in a browser. We need to update the .htaccess file so that the server will load Welcome.html first. Open (or create) the .htaccess file in your domain’s document root and add the following line: DirectoryIndex Welcome.html. Once that is added, when your domain is visited that page will be loaded first.

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support