Set default page on Linux plesk using htaccess

Applies to :

  • Linux Server


To perform this task, you need to have :

  • Knowledge in accessing the server via SSH or FTP.
  • IP address or server hostname.
  • Your server SSH/FTP username and password.


You can simply create a file named ".htaccess" in the folder where you want to have a DirectoryIndex rule to take effect. In a shared hosting plan, there is a possibility that you will not able to create ".htaccess" because you are not allowed to upload or create a filename begin with "." (dot). However, our support will be able to help you to rename the file later.

Copy and paste following line in .htaccess file :

DirectoryIndex default.html index.html index.cgi index.php

Please note that the Apache server will look for the list files, from left to right. In the above example, the Apache server will first look for "default.html" to load. If "default.html" cannot be found, it looks for "index.html" next. If "index.html" cannot be found, it looks for "index.cgi" next, and so on.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Getting started with Webhosting

Getting Started Log in to your server control panel Uploading your website Creating email...

How initiate a FTP connection to the server?

Overview File Transfer Protocol (FTP) is a standard network protocol used to transfer files from...

Create a phpinfo page

Applies to : All Plesk Linux server All Plesk Windows server Requirements To perform this...

How To Use formmail.cgi

Applies to : All Linux server RequirementsTo perform this task, you need to have : Knowledge...

How to take a full VPS backup via VZPP/PVA control panel?

Applies to : Virtuozzo Linux (VPS) with VZPP/PVA enabled. Requirements To perform this...