Error pages (cPanel)

From JumbaWiki

Jump to: navigation, search
For a more extensive list of error pages, see: List of error pages

With the error pages tool you can create custom error pages to display when a user enters a wrong URL, an outdated URL or when the user is not authorized to access a specific directory of your web space.

Contents

Editable error screens

For more information, see main article: List of error pages

These are the error screens you can edit through cPanel:

  • 400 - Bad request
  • 401 - Authorization required
  • 403 - Forbidden
  • 404 - Wrong page
  • 500 - Internal server error

Editing options

When editing these pages, you can choose from these custom fields to show to the user:

  • Referring URL: <!--#echo var="HTTP_REFERER" -->
  • Visitor's IP Address: <!--#echo var="REMOTE_ADDR" -->
  • Requested URL: <!--#echo var="REQUEST_URI" -->
  • Server name: <!--#echo var="HTTP_HOST" -->
  • Visitor's Browser: <!--#echo var="HTTP_USER_AGENT" -->
  • Redirect Status Code: <!--#echo var="REDIRECT_STATUS" -->

Error page templates

Here are some templates created by others that you can use when creating your custom error pages:

Customised Error Pages for Multiple Domains

If you set a custom error doc in Cpanel, but you have multiple domains, your custom error pages don't work quite as expected. They work fine for your main page, but they give an error on your secondary domains.

This can be fixed by using htaccess files. Htaccess files allow you to override Jumba's webserver settings with your own. Your public_html folder might be set up as follows:

/home/kdook/public_html/
/home/kdook/public_html/website2/

To override the Error document settings for website2, create a file called ".htaccess" in your website2 folder.

Place the following lines in this file:

ErrorDocument 400 /400error.html
ErrorDocument 403 /403error.html
ErrorDocument 404 /404error.html
ErrorDocument 500 /500error.html 

Now if website2 requires an error document, it will use one of the ones listed above. Note that you must also create the error html pages in your website2 folder:

/home/kdook/public_html/website2/400error.html
/home/kdook/public_html/website2/403error.html
/home/kdook/public_html/website2/404error.html
/home/kdook/public_html/website2/500error.html

When using the ErrorDocument directive, the paths may be relative or absolute, so the following is also valid

ErrorDocument 400 http://www.mydomain.com/400error.html

See also

Advanced (cPanel options)
Image:Apache.gif
Apache Handlers
Image:Imagemanager.gif
Image Manager
Image:Indexmanager.gif
Index Manager
Image:Errorpages.gif
Error pages
Image:Cron.gif
Cron jobs
Image:Frontpage.gif
FrontPage Extensions
Image:Nettools.gif
Network Tools
Image:Support_cP.gif
Submit a Support Request
Image:Clam.gif
Virus Scanner
Image:Mime.gif
MIME Types
Personal tools
Australian Photography | Unique Views of Reality | Daedalus