As we know, when we connect to a web server, if some error occurs, the server will show us some error message. As an example if the web page we are requesting is not available in the server it will generate a 404-page not found error. But as you have noticed, in most cases this error page is just a simple page which most probably has a white background with some simple text formatting. But do you know that you can customize those error pages as you like? Give it a theme( as an example, the theme of the webs site it self)? In this article I’m going to show you how to customize these error pages in a web server where you have access to cPanel. There are two methods to do this.
1st method:
Log in to cPanel. Then go to Advanced → Error pages . There you will find a list of various error pages that cPanel currently has. Click on any one of them and you will be directed to a page where you can customize the page using usual html syntaxes .
2nd method:
If you want to replace the error page with a page that you have already designed, the easiest way to do so is to upload it to the server and replace the relevant file. The relevant files for the error pages can be found in the public_html folder. These files have the .shtml extension. So make sure that you rename the .html file that you are uploading to the .shtml extension. Here are some names of the error pages.
- 400.shtml : Bad request
- 401.shtml : Authentication required
- 403.shtml : Forbidden
- 404.shtml : Page not found
- 500.shtml : Internal server error
You will be able to find an example customized 404 page in http://ishans.info/wrongURL
Leave a Reply