How to place an image file as your homepage
By default, the webservers at InMotion Hosting look for specific file names to display as the first page of a website. They also look for these pages in a specific order. The file names, in order, are index.htm, index.html, index.php
If you want to use a different file, such as an image, you will need to tell the server to look specifically for that file and to ignore the default file names. Perhaps you created a nice image with your business logo and 'Coming Soon!' as the text and wish to use that image as your main page. Follow along with the instructions below to learn how to set an image as the first page of your site.
NOTE: This is not a recommended method as the image will display in different locations on the visitor's screen depending on which browser they are using. The recommended method would be to create a single index.htm or index.html file with just that image. This way it would display uniformly across the browsers.
Setting an image as your website's homepage
- Log into your cpanel
- Using the File Manager, navigate to the home folder for the domain you want to work with.
- Once inside the correct folder, you will need to edit your .htaccess file by highlighting the file and clicking the Edit icon located across the top of the panel. If you do not have one in the folder, you will first need to create a new one by clicking the New File icon located in the list of icons at the top of the screen. (note the correct name is .htaccess complete with the . in the front)
- Once the editor page comes up on the screen, you will want to enter the code DirectoryIndex [filename] at the top of the file. Be sure to change [filename] to your image filename. For example, if your image is named splash.jpg then you would enter the code below.
- Once you have entered the code, click the Save Changes button found in the upper right hand screen. You can now visit your site and see your image as the first page.
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
Post a Comment
Do you want to publish a tutorial to our support center?