How to change the default index page


The below command will set the default page your website shows to whatever you specify. For example the below command will set your website to show the index.html file as default.

DirectoryIndex index.html

The below change will attempt to show business.html as the default page for your website and every directory.

DirectoryIndex business.html

And you can even do something cool like have it load a movie or image by default.

DirectoryIndex cool.mov

Or even specify multiple files so that it will try to load the first one, then the next, and so on. So with the below line it would try to load business.html, then if that wasn’t there index.cgi, and if that wasn’t there index.pl, and so on.

DirectoryIndex business.html index.cgi index.pl default.htm

If it can’t find the file you specify it will revert to a directory listing of the files in that folder.


¿Le ha resultado útil este artículo?



  • Set Up URL Masking On Your Site

    At times, you may have a site created in a different location or directory and don’t want your visitors to see the full path to your files. Fort...

  • How To Disable Nginx Caching

    Click Login to cPanel under the Actions Menu Navigate to the Files section and click on File Manager Click the Settings icon...

  • How to Redirect HTTP Requests to HTTPS

    Below we are going to show you how to redirect all non-https request to use https. Why would you do this? This depends on what kind of site you are ho...

  • Current Loaded Modules

    Below we have listed the Apache modules that are loaded on all of our services. Updated February 24th/2015 actions_module alias_module asis_module ...

  • Error Messages Overview

    Error 400: Bad RequestError 401: Authorization RequiredError 403: ForbiddenError 404: Page Not FoundError 405: Method Not AllowedError 406: Not Accept...