
172 Serving Your Customers
Customizing Web Server Error Messages
When visitors coming to a site request pages that the web server cannot find, the web
server generates and displays a standard HTML page with an error message. The
standard error messages may inform of problems, but they do not usually say how to
resolve them or how to get the lost visitor on his way, and they also look dull.
You may want to create your own error pages and use them on your web server. With
Plesk you can customize the following error messages:
400 Bad File Request. Usually means the syntax used in the URL is incorrect (for
example, uppercase letter should be lowercase letter; wrong punctuation marks).
401 Unauthorized. Server is looking for some encryption key from the client and is not
getting it. Also, wrong password may have been entered.
403 Forbidden/Access denied. Similar to 401; a special permission is needed to access
the site - a password and/or username if it is a registration issue.
404 Not Found. Server cannot find the requested file. File has either been moved or
deleted, or the wrong URL or document name was entered. This is the most
common error.
405 Method Not Allowed. The method specified in the Request-Line is not allowed for
the resource identified by the Request-URI.
406 Not Acceptable. The resource identified by the request is only capable of
generating response entities which have content characteristics not acceptable
according to the accept headers sent in the request.
407 Proxy Authentication Required. This code is similar to 401 (Unauthorized), but
indicates that the client must first authenticate itself with the proxy.
412 Precondition Failed. The precondition given in one or more of the request-header
fields evaluated to false when it was tested on the server. This response code
allows the client to place preconditions on the current resource metainformation
(header field data) and thus prevent the requested method from being applied to a
resource other than the one intended.
414 Request-URI Too Long. The server is refusing to service the request because the
Request-URI is longer than the server is willing to interpret. This rare condition is
only likely to occur when a client has improperly converted a POST request to a
GET request with long query information, when the client has descended into a URI
"black hole" of redirection (e.g., a redirected URI prefix that points to a suffix of
itself), or when the server is under attack by a client attempting to exploit security
holes present in some servers using fixed-length buffers for reading or manipulating
the Request-URI.
415 Unsupported Media Type. The server is refusing to service the request because
the entity of the request is in a format not supported by the requested resource for
the requested method.
500 Internal Server Error. Could not retrieve the HTML document because of server-
configuration problems.
501 Not Implemented. The server does not support the functionality required to fulfill
the request. This is the appropriate response when the server does not recognize
the request method and is not capable of supporting it for any resource.
502 Bad Gateway. The server, while acting as a gateway or proxy, received an invalid
response from the upstream server it accessed in attempting to fulfill the request.