HostSEO Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog


Creating Web Template in cPanel

The placeholder pages which you have created for a specific account will appear for just the site of that account. For example, if you create placeholder pages for your root account, these will not appear for the sites owned by the reseller.

Things to remember while configuring a Template

The Web Template Editor interface gives the access to create placeholder web pages. People will see these pages while visiting a site on your server if it matches any one of the following conditions:

  • The site has not been configured by the owner yet, or there is absence of an owner for the site on your server.
  • The domain addresses an incorrect IP address.
  • The site has been move to some other address.
  • The site has any kind of problem regarding connection or firewall.
  • The owner has suspended the site from being accessed.

Only those accounts for which the placeholder pages have been created will be affected. To create a template, the steps written underneath are to be followed:

  • The images must be stored in the directory named /usr/local/img-sys/directory and the directory img-sys is to be used to link to them.
  • [%data.protocol%] tag is to be used when you are linking to images or files outside of the img-sys directory as a substitute for http or https.
  • If you redirect a domain, the placeholders pages cannot be seen by the visitors. To make it possible for visitors to see the actual Website pages, the finished pages should be copied from the /var/cpanel/webtemplates/root/English/ directory to the /home/username/public_html directory of the destination domain.

There are several types of Template, used for different purposes. Such as :

Default Website Pages:

The Default Website page appears only when any of the following statements are true:

  • This site has not been published by the owner.
  • The site has been deleted by the owner.
  • The domain points to an incorrect IP address.
  • The domain addresses to not any cPanel accounts.

The default website template in EasyApache 3 is overridden by the following manually created scripts :

/usr/local/apache/htdocs/index.php
/usr/local/apache/htdocs/index.cgi
/usr/local/apache/htdocs/index.pl

The default website template in EasyApache 4 is overridden by the following manually-created scripts:

/var/www/html/index.php
/var/www/html/index.cgi
/var/www/html/index.pl

The files may also be place in the skeleton directory to load a default page for new accounts.

The location of this template is within the following directory:

/var/cpanel/webtemplates/root/english/default.tmpl

To move an Account

This template appears when a site has been moved. The location for this template within the directory is: /var/cpanel/webtemplate/root/English/moving.tmpl

Connection Selection

This template appears only if there is a firewall connection problem. In addition to the [%data.protocol%] tag, following tags can also be used for the configuration if this template :

  • [%data.ishttps%]– Inserts 1 if site has been accessed by the visitor through a secure port (for example 2083,2087 or 2096),or 0 if the visitor uses some other port.
  • [%data.port%]– Inserts the cPanel port number.
  • [%data.js_safe_redirecturl%]– The URL of the domain’s cPanel interface is inserted.
  • [%data.js_safe_redirectural%]– Inserts the URL of the cPanel proxy.

Within the “/var/cpanel/webtemplates/root/English/redirect.tmpl” directory, this template is located.

Account Suspension

This template appears if the site has been suspended by the owner or the root user. It is located within the “/var/cpanel/webtemplates/root/english/suspended.tmp” directory.

How to Edit a Template File:

One needs to perform the following steps to modify a template file within WHM interface. :

  • First, the tab corresponding to the template which is to be changed is to be selected.
  • Make the changes you wish to make.
  • To check the changes before proceeding, click Preview.
  • Click on Save.
  • To return to the recent version of the template, click on Revert.
  • To cancel the changes, click on Revert to Default.

How to Upload a Template File:

In order to upload a custom website template, these steps must be followed:

  • The tab should be selected first which corresponds to the template which has to be edited
  • Select the option ‘Choose File’ under the menu box ‘Upload Your Own Template’.
  • On your local computer browse to the template file.
  • Click on the option ‘Upload Template’.

Conclusion

The provision to create Web Templates files helps Website owners mitigate the downtime negativity associated with a domain migration, account suspension, etc. In the midst of severe competition, shutting down the website without any custom page could affect the brand credibility.

Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar

SatSunMonTueWedThuFri
 12345
6789101112
13141516171819
20212223242526
27282930 

Born in 2004 ... Trusted By Clients n' Experts

SEO Stars

They never made me feel silly for asking questions. Help me understand how to attract more people and improve my search engine ranking.

Read More

Emily Schneller Manager at Sabre Inc
SEO Stars

Took advantage of Hostseo's superb tech support and I must say, it is a very perfect one. It is very fast, servers reliability is incredible.

Read More

Leena Mäkinen Creative producer
SEO Stars

We're operating a worldwide network of servers with high quality standards requirements, we’ve choose hostseo to be our perfect partner.

Read More

Ziff Davis CEO at Mashable
SEO Stars

It’s very comfortable to know I can rely about all technical issues on Hostseo and mostly that my website and emails are safe and secured here.

Read More

Isaac H. Entrepreneur
SEO Stars

With hostseo as a hosting partner we are more flexible and save money due to the better packages with great pricing, free SEO n' free SSL too!

Read More

Madeline E. Internet Professional