Page tree
Skip to end of metadata
Go to start of metadata

This document is for a previous release of cPanel & WHM. To view our latest documentation, visit our Home page.

For cPanel & WHM 11.40


(Home >> Account Functions >> Web Template Editor)

Overview

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

  • The domain's owner has not yet configured the site, or there is no owner for the site on your server. 
  • The domain points to an incorrect IP address. 
  • The site has moved. 
  • The site has a connection or firewall problem. 
  • The domain owner has suspended the site.

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

Important:

  • 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 and use the img-sys directory to link to them.
    • When you link to images or files outside of the img-sys directory, use the [% data.protocol %] tag as a substitute for http or https.
  • 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.

Template types

Template typeDescriptionFile
Default Website Page

This template appears if any of the following statements are true:

  • The owner has not published this site.
  • The owner has 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.

Notes:

  • The following manually-created scripts will override the default website template:

    /usr/local/apache/htdocs/index.php
    /usr/local/apache/htdocs/index.cgi
    /usr/local/apache/htdocs/index.pl
  • You can also place files in the skeleton directory to create a default page for new accounts. For more information, read our Skeleton Directory documentation.
/var/cpanel/webtemplates/root/english/default.tmpl
Account MoveThis template appears if the site has moved.

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

Connection Selection

This template appears if the site has a connection or firewall problem.

In addition to the [% data.protocol %] tag, you can 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.
/var/cpanel/webtemplates/root/english/redirect.tmpl
Account SuspendedThis template appears if you suspended the site. /var/cpanel/webtemplates/root/english/suspended.tmpl

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 that you wish to edit. For more information, see the Template types section.
  2. Make the desired changes.
    • To view your changes before you are finished, 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, see 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.