How can I change the default page / document?

Create a .htaccess file, include the below information into it and upload it to the public_html directory. If you cannot create a .htaccess file because you are using Windows, simply name it htaccess and rename the file after it is uploaded with your ftp client.


DirectoryIndex filename.html


This would cause filename.html to be treated as your default page, or default directory page. You can also append other filenames to it. You may want to have certain directories use a script as a default page, that is not a problem either.


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



In some cases the default file does not exist and you will wanto to have the default page be a URL or address. In such a case use the following: 


RewriteRule ^/?$ /home [L,R=301]

/home being the URL you would like to set as the default address for the domain.



  • 560 Users Found This Useful

Was this answer helpful?

Related Articles

How can I redirect http to https?

Create an .htaccess file with the following contents and upload it to your public_html directory....

Redirect website to https:// and www. via .htaccess

To forward a website to use both www. and https:// use the following in an .htaccess file:...

How to create a temporary 302 redirect via .htaccess

An easy way to create a temporary redirect from one page to another web page is to use the 302...

Set CORS header to Allow Access for any Incoming Domain

The following may be used to set to always set the CORS header for any incoming domains without...