Web Template Editor  Print this Article

Overview:

The Web Template Editor interface allows you to create templates for placeholder web pages. Visitors see these pages when they navigate to a site on your server that meets one of the following conditions:

  • The domain’s owner did not configure the site, or no owner exists for the site on your server.

  • The domain points to an incorrect IP address.

  • The site moved.

  • A connection or firewall problem exists on the site.

  • The domain’s owner suspended the site.

Placeholder pages

Note:

If a cPanel and Apache placeholder page appears when you navigate to a domain, you must properly configure VirtualHost in the Apache configuration file.

The placeholder pages that you create for a specific account only appear for that account’s sites. For example, placeholder pages that you create for the root user do not appear for sites that reseller accounts own.

When you configure your template, you must perform the following actions:

  • Store the images for these templates in the /usr/local/cpanel/img-sys/ directory. When you link to the images, provide links relative to the /usr/local/cpanel/ directory (for example, /img-sys/myimage.jpg).

  • When you link to images or files outside of the img-sys directory, use the [% data.protocol %] tag as a substitute for the http or https protocol.

  • If you redirect a domain, visitors will not see placeholder pages. To ensure that visitors see these pages, you must copy the finished pages from the /var/cpanel/webtemplates/root/english/ directory to the /home/username/public_html directory of the destination domain.

Suspended accounts

For suspended reseller accounts, either of the following files may contain the reseller’s web templates:

  • /var/cpanel/webtemplates/reseller/english/suspended.tmpl

  • /home/user/public_html/suspended.page

    Note:

    In this file path, user represents the account’s username.

     

We strongly recommend that you only use this interface to manage and modify web templates.

Edit a template file

To modify a template file from within the WHM interface, perform the following steps:

  1. Select the tab that corresponds to the template to edit. For more information, read the Template types section.

  2. Make the desired changes. To view your changes before you finish, click Preview.

  3. Click Save.

    • To revert to the most recent version of the template, click Revert.

    • To discard your changes and revert to the default template, click Revert to Default.

Upload a template file

To upload a custom website template, perform the following steps:

  1. Select the tab that corresponds to the template that you wish to edit. For more information, read the Template types section.

  2. Under Upload Your Own Template, click Choose File.

  3. Browse to the template file on your local computer.

  4. Click Upload Template.

Template types

You can select from the following templates:

Default Website Page

This template uses the /var/cpanel/webtemplates/root/english/default.tmpl file. It displays contact information from the Public Contact Information tab in WHM’s Customization interface (WHM >> Home >> cPanel >> Customization). If the hosting provider has not entered that information, the template displays the webmaster email address of the account.

Note:

If you do not wish to display any contact information, comment out or remove the contact-info section.

The default template appears if any of the following statements are true:

  • The owner did configure this site.

  • The owner deleted this site.

  • The domain points to an incorrect IP address.

  • The domain points to an IP address on your server, but none of your cPanel accounts own that domain.

Note:
  • The following manually-created scripts override the default website template in EasyApache 4:
    1
    2
    3
    
    /var/www/html/index.php
    /var/www/html/index.cgi
    /var/www/html/index.pl
  • You can also place files in the skeleton directory to load a default page for new accounts. For more information, read our Skeleton Directory documentation.

Account Move

This template appears if the site moved. It uses the /var/cpanel/webtemplates/root/english/moving.tmpl file.

Connection Selection

This template appears if a connection or firewall problem exists on the site. It uses the /var/cpanel/webtemplates/root/english/redirect.tmpl file.

In addition to the [% data.protocol %] tag, use the following tags to configure this template:

  • [% data.ishttps %] — Inserts 1 if the visitor accessed the site at a secure port (for example, 20832087, or 2096), or 0 if the visitor did not.

  • [% data.port %] — Inserts the cPanel port number.

  • [% data.js_safe_redirecturl %] — Inserts the URL of the domain’s cPanel interface.

  • [% data.js_safe_proxyurl %] — Inserts the URL of the cPanel proxy domain.

Account Suspended

This template appears if the account’s owner or the root user suspended the site. It uses the /var/cpanel/webtemplates/root/english/suspended.tmpl file.

Note:

The default version of this template displays contact information from the Public Contact Information tab in WHM’s Customization interface (WHM >> Home >> cPanel >> Customization). If the hosting provider has not entered that information, the template displays the webmaster email address of the account. If you do not wish to display any contact information, comment out or remove the reason-text content division section.

Was this answer helpful?

Related Articles

Change Site's IP Address
Overview: This interface allows you to change an account’s IP address. You can use this...
Create a New Account
Overview: The Create a New Account interface allows you to create new cPanel or WHM accounts....
Email All Users
Overview: This interface enables you to email every cPanel user simultaneously. This feature is...
Force Password Change
Overview: This feature allows you to force users to change their passwords. After you use this...
Limit Bandwidth Usage
Overview: Important: Suspension and bandwidth limiting are two separate functions. For more...