What is an Under Construction page?
An Under Construction page is used to display information about a web page or website that is not yet completed or ready for viewing on the internet. Commonly used text messages on these pages are "Coming Soon" or "Under Construction."
Website Under Construction Page Graphics
Here are a couple of examples of Under Construction page graphics that you are welcome to use. Note that you can set the Under Construction page for the entire website or simply a web page.
NOTE: By default, Web Hosting Hub provides an under construction page with the HTML code and graphics. You can find the file in your PUBLIC_HTML folder under the name of DEFAULT.HTM.
Define the Under Construction Page for your Website
When Web Hosting Hub servers display a website, they are set to look for specific filenames in a specific order. The names, in order, are index.htm, index.html, index.php and default.htm. This means if you have both an index.html page and an index.php page, the index.html page will display since it is first in the list. The default.htm page is last on the list and is quickly replaced when any of the other three types are created and uploaded. The initial holding page you see on your site when you first sign up for your hosting is named default.htm.
When using programs to develop your site, they will generate either an index.htm, index.html, or index.php file in anticipation of being the first page on your site. This article will show you how to create your own temporary page to display a message without interrupting or overwriting the index page generated by your design program. This way you can work on your site behind the scenes and give your visitors any message you like.
Creating the Basic Under Construction page
First you will need to create a file to use as your main page. Follow the short set of instructions below as we show you how to create a very basic Under Construction page.
- Log into your cPanel.
- Enter the File Manager tool and ensure you are in the public_html folder.
- Click on the New File icon found in the row of tool icons across the top of the page.
- Name your file. In this example, we named it construction.html. Click Create New File to finish the file's creation.
- Next, you will need to edit this empty file. Highlight the filename and click on the HTML Editor icon located in the toolbar across the top.
- In the HTML Editor, create your page. We keep it very simple in this example by making a text message.
- Click on the Save button found in the upper left of the editor toolbar to save the page.
Edit the .htaccess file
Now that your page has been created, we now need to tell the server to show that as your default page.
- Log into your Cpanel (you should still be there if you just finished the above steps)
- Enter the File Manager tool. Be sure you select the checkbox for Show Hidden Files (dotfiles) as you enter the File Manager as we will be editing or creating one.
- Ensure you are in the public_html folder and look for a file named .htaccess. If you do not have one, create a new empty file by that name as you did for the other page. Be sure to name it .htaccess (note the . in the front of the name, it is very important)
- We now need to edit this file. Highlight the filename and click on the Edit File icon found in the top toolbar.
- To force your account to display the construction.html file, you need to add the following code at the top of the .htaccess file.
- Click on the Save Changes button to finalize the change.
Now you can visit your website to see the new main page. Once you are finished with your site and want to remove the page, simply edit the .htaccess file and remove the DirectoryIndex line of code. Below is a shot of how our page looks with the new Under Construction message.
Building Under Construction Pages for WordPress or other Web-based Applications
You may sometimes find yourself needing to create an Under Construction page for other web-based applications like WordPress. WordPress, like many content management systems provide ways for you to create a maintenance page that allows you to prevent people from accessing your website while displaying an under construction page. You can find information on both topics for Wordpress in 310:Setting Up a Comming Soon or Maintenance Page for WordPress. You can also do this in OpenCart 1.5, this is one of the first steps when building an OpenCart ecommerce solution. Of course, you don't have to state "Under Construction" or "Website coming soon" on your landing page, you can always use any image file as a placeholder for your homepage. Be creative and choose what works best for you as long as it keeps your visitors both informed and interested in your website.