Custom Error Pages


How to configure custom error pages for your domain, and what the error codes mean.


Configure Custom Error Pages

Use this utility to define what will be done if a requested page on your site is missing or fails to open for any other reason. In order to specify your own Error Documents, you need to be slightly familiar with the server returned error codes:

Use this utility to define what will be done if a requested page on your site is missing or fails to open for any other reason. In order to specify your own Error Documents, you need to be slightly familiar with the server returned error codes:

Successful Client Requests

200   OK
201   Created
202   Accepted
203   Non-Authoritative Information
204   No Content
205   Reset Content
206   Partial Content

Client Request Redirected

300   Multiple Choices
301   Moved Permanently
302   Moved Temporarily
303   See Other
304   Not Modified
305   Use Proxy

Client Request Errors

400   Bad Request
401   Authorization Required
402   Payment Required (not used yet)
403   Forbidden
404   Not Found
405   Method Not Allowed
406   Not Acceptable (encoding)
407   Proxy Authentication Required
408   Request Timed Out
409   Conflicting Request
410   Gone
411   Content Length Required
412   Precondition Failed
413   Request Entity Too Long
414   Request URI Too Long
415   Unsupported Media Type

Server Errors

500   Internal Server Error
501   Not Implemented
502   Bad Gateway
503   Service Unavailable
504   Gateway Timeout
505   HTTP Version Not Supported

To configure Error Pages

  1. Go to Domain Settings > Web Options for the domain you need.
  2. Scroll down to find the Error option and click the Add icon on the right.
  3. In the form that appears, enter your custom settings.

For Linux Accounts

  • Error Document Code: choose the one you need from the drop-down box.
  • Message or URL: the path to the page with ERROR message
    IMPORTANT: if ErrorDocument 401 is chosen in Error Document Code, the path must be relative to the local user’s site home root
  • Type: Specify if the text in the previous field must be treated as a URL (Redirect) or as a text message (Message).

For Windows Accounts

Users will get a slightly different form to enter the path to the custom error page. Note that the path should be relative to the home directory, not to the virtual host directory.

If you check FILE:

  • only static error page files can be used.
  • the same error page files for this domain can be shared with other account domains.

For instance, with the following file path, all account domains will share this error page: pages\404_error.html

  • use the \ character as a delimiter in the file path.
  • do not start the file path with \.

If you check URL:

  • it will allow you to use scripts (php/ASP) to dynamically generate error pages (alternatively, use static error page files for each type of error page)
  • error page files for this domain can’t be shared with other domains
  • Path to Custom Error page must be relative to the virtual host and start with /.

HTTP Status Codes

HTTP status codes are sent by the server in response to a HTTP request, it is common to log and examine the status code of a request to help identify the cause of an error message you are seeing, check your visitors are not seeing errors and/or improve performance.

Where to find http status code

In the server’s websites log files (what the server sends): Follow the instructions to enable http(s) request logging, statistics along with how to access and open log files for your websites.

In web browsers or wget clients (what the client receives):

  • FireFox – plugin httpfox
  • Chrome – F12.
  • curl –head /
  • wget –server-response –delete-after /

Log files examples with status codes

[IP] – – [DATE] – [METHOD] [URL] [HTTP_VERSION] [STATUS_CODE] [REQUEST_SIZE] “[REFERER]”
123.123.123.123 – – [04/Jun/2014:03:30:47 +0100] “GET /wp-content/themes/pipeten2/images/pipeten.gif HTTP/1.1” 200 1332 “/”
123.123.123.123 – – [04/Jun/2014:03:31:26 +0100] “GET /wp-content/themes/pipeten2/images/pipeten.gif HTTP/1.1” 304 – “/”
123.123.123.123 – – [04/Jun/2014:03:40:21 +0100] “GET /doesnotexist HTTP/1.1” 404 27826 “-”
123.123.123.123 – – [04/Jun/2014:03:44:00 +0100] “GET /r/update-cc/ HTTP/1.1” 302 – “-”
123.123.123.123 – – [04/Jun/2014:03:44:00 +0100] “GET /index.php/2007/05/how-do-i-update-my-credit-card-details-in-the-control-panel/ HTTP/1.1” 301 – “-”
123.123.123.123 – – [04/Jun/2014:03:44:00 +0100] “GET /2007/05/how-do-i-update-my-credit-card-details-in-the-control-panel/ HTTP/1.1” 200 43702 “-”
123.123.123.123 – – [04/Jun/2014:03:47:36 +0100] “GET /denied/ HTTP/1.1” 403 292 “-”

Common HTTP status codes

200 – OK
A good thing to see, status 200 means that the request completed successfully and the content served.

301 – Moved Permanently
Only seen when redirected by code or web server configuration, usually followed by another request from the same visitor hitting the correct content. Use when you want the visitor / spider / search engine to forget this URL and just index the new, for example when you move or rename a page.

302 – Found (Moved Temporarily)
Only seen when redirected by code or web server configuration, usually followed by another request from the same visitor hitting the correct content. Use when you still want the visitor / spider / search engine to try index the original URL, for example when doing maintenance on a page.

304 – Not Modified
A good thing to see, identical to status 200 except that the content is not re-delivered (because it has not been modified since the last cached request). This is a reasonably good indication that the server is sending expires headers and browsers are correctly caching non changed content.

307 – Temporary Redirect
Intended to replace the 302 status (more restrictive than 302, not support in <HTML/1.1 clients).302).

308 – Permanent Redirect
Intended to replace the 301 status (more restrictive than 301, not support in <HTML/1.1 clients).

400 – Bad Request
Not something you should see frequency, most typically a problem with code or web browsers interpretation of the code and then sending a bad or malformed request the web server could not understand.

401 – Unauthorized
On visiting a password protected file or directory (through .htaccess/htProtect/htAuth or other similar method) and entering an incorrect username/password combination, you will get this status code.

403 – Forbidden
When access is explicitly denied to the URL / resource / script, most typically due to .htaccess or IIS restrictions.

404 – Not Found
A common http status code, 404 occur when the resource requested cannot be found. The cause is often either due to failed FTP upload or incorrect path / URL to the resource.

418 –  I’m a teapot
Yes, that really is a http status code (RFC 2324), sadly we have not found a justifiable use for it in the Pipe Ten infrastructure, perhaps when we make our IPv6 kettle.

500 – Internal Server Error
There has been an error processing the request, this can be due to an error in the script, too many resources being requested or server side error.

503 – Service Unavailable
There has been an error processing the request, this is can due to excess resources being requested or a server side error.