Limespace Networks
Please Login or Register


Error Page Codes

What are Error Codes?

These numbered error codes are how the Web server tells the user
about a status or error encountered. There are many different error
codes that a server can deliver, but these are a few of the more common codes.

401 – Unauthorized
Access to the URL resource requires user authentication which 1) has not
yet been provided or 2) which has been provided but failed authorization
tests. This is commonly known as "HTTP Basic Authentication". Unless you
have a good reason to do so, it is not recommended to redirect a 401 error.

403 – Forbidden
The request was a legal request, but the server is refusing to respond
to it. Unlike a 401 Unauthorized response, authenticating will make no
difference. This is usually due to a scripting or permission(s) issue.

404 – Not Found
This response code indicates that the client was able to communicate
with the server but either the server could not find what was requested,
or it was configured not to fulfill the request and not to reveal the
reason. Error 404 should not be confused with "server not found" or
similar errors, in which a connection to the destination server cannot
be made at all.

500 – Internal Server Error
Your Web server encountered an unexpected condition that prevented it
from fulfilling the request by the client (e.g. your Web browser) for
access to the requested URL. This is a 'catch-all' error generated by
your Web server. Basically something has gone wrong, but the server can
not be more specific about the error condition in its response to the

What are custom Error Code pages?

Instead of seeing the default error message, you can create your own
error pages by adding special command lines to a .htaccess (pronounced
dot h t access) file. This file typically lives in the /public_html/
directory in your account. Or if you have add-on domains, it lives in
/public_html/{add-on domain}/. You may already have one in there. If that is
the case, then you can just add these lines to it. Otherwise, you can
just create a new, empty, .htaccess file to add these lines to it.

The format for an ErrorDocument statement in a .htaccess file

ErrorDocument CODE URL

The CODE refers to the error code you wish to redirect (403, 404, 500,
etc) and URL refers to the location of the file you would like displayed.
The URL can either be a URL-Path (e.g. /errors/404.html) or a full URL
(e.g. For an addon domain or
subdomain the error page path must be a full URL.


If you have created a 404.shtml and uploaded it to the root directory of
your domain, page your .htaccess file would have a line like

ErrorDocument 404

If you wanted to use a 404.php script file you have written it would
look like this:

ErrorDocument 404

If you would like people to be redirected to the homepage when they
reach a non-existent page, you could use a line like this:

ErrorDocument 404

A .htaccess file controls the directory in which it sits, and all
subdirectories. However, by placing additional .htaccess files in the
subdirectories, other .htaccess files can be overruled.

For more information you can refer to the following resources:

Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
How do I change my DNS? (Views: 1780)

Powered by WHMCompleteSolution


Quick Navigation

Client Login



Remember Me


Follow Us on Twitter