Custom Error Pages

To create a custom error page for your site, the simplest way is to create a new page in your root directory and call it by the error code name. EX: 404.html, 503.html etc. You will need to make an entry to your .htaccess file like any of these (use one or multiple):

ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml


Common problems

You can even use existing pages as the resulting page. Say you don't want any visitors seeing 404 errors on your site. You can make your home page the result, like so:

ErrorDocument 404 /index.html

There are many error pages which may be defined.

Client Request Errors
400 - Bad Request
401 - Authorization Required
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

NOTE: labeling an error as a server code indicates an issue the server cannot figure out. It could be a DNS issue, faulty script on your site, or many others. By categorizing errors, we can target the real issue more easily when troubleshooting.

  • 29 Users Found This Useful
Was this answer helpful?

Related Articles

How to FTP

FTP stands for File Transfer Protocol, and gives you the ability to upload or download files from...

What is my absolute path to root?

/home/username/public_html/ Be sure to replace "username" with your actual site user name....

How to use robots.txt

What is the purpose of the robots file? When a search engine crawls (visits) your website, the...

AmeriWeb Hosting ecommerce sites conform to PCI standards

If you accept credit cards on-line, you are automatically expected to conform to industry...

Alias Domains included with all hosting plans

If you have several domain names, we can set up our server to allow them to point directly to...

Powered by WHMCompleteSolution