Define an Error Page:
When your website is inaccessible web server automatically displays a web page stating the error and error code. Such a web page is called error page.
For instance, if the URL is unavailable the visitor will see a 404 error or if the visitor is accessing unauthorized area of a website then 401error is shown.
Customizing error page:
Web servers by default are pre-loaded with Common error pages.These default error pages can be customized including your description, design or branding logos/banners.
Customizing error page for your account is not a complex process and it can be achieved by doing these simple steps.
- Login to your account control panel (cpanel).
- Go to ADVANCED box.
- Click on ERROR PAGES.
- Select the domain/sub domain for which you want custom error page.
- Click the error page you want to edit.
- Add or paste your own HTML or SHTML code, then click SAVE.
And you have successfully created a customized error page for your URL.
Composing HTML or SHTML code is an issue for me!
It is not an issue if you follow these steps.
- Use the sitebuilder program to design your error page and publish it.
- Now go online and load the URL of the published page.
- Right click on the page and select view page source.
- A new window will open where you can find the page code.
- Right click and copy the entire code.
- Then paste the code where you need it.
Now you may get rid of the designed page from the sitebuilder program.
Some predictable problems are:
A.) Still the browser is showing default (or hosting provider) error pages instead of showing my customized error page! If so:
In your public_html folder (where all your website data resides) find .htaccess and add this code to the file.
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
In case if you do not find the file, create a file named .htaccess and add the above code.
B.) On some cases website owners do not want their visitors to end up seeing the error page. For that you can make an existing page say ‘Home Page’ to get displayed instead of error page like this:
ErrorDocument 404 /index.html
C.) Normally browsers (particularly Internet Explorer) do not load custom error pages if it is less than 1 Kilobytes. So make sure that the custom error page is larger than 1 KB.
D.) At some point you may find some valid reason to get back to the default error pages, if so then delete error page files from the public_html folder.
ERROR CODES AND ERRORS:
Custom error page can be created for any valid HTTP status code starting with 4 or 5.
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
500 – Internal Server Error
501 – Not Implemented
502 – Bad Gateway
503 – Service Unavailable
504 – Gateway Timeout
505 – HTTP Version Not Supported