This tutorial will show you how to add custom error pages to your free 000webhost website. By following this tutorial, your custom error pages will be shown instead of the default error pages.
Navigate to your
File Manger inside you control panel
Create a New file called
.htaccess inside your
Insert The Following code into the
ErrorDocument 400 <URL of Error Page> ErrorDocument 401 <URL of Error Page> ErrorDocument 403 <URL of Error Page> ErrorDocument 404 <URL of Error Page> ErrorDocument 500 <URL of Error Page> ErrorDocument 502 <URL of Error Page>
Change all of the “<URL of Error Page>” to the page that you want people to be sent to when an error is called back on your website.
Create all the files that you have the URL’s for and test it out !
Another Tip is although you have your own custom error page don’t forget to link back to 000webhost as they are giving you a Great FREE service ! i suggest a banner or a small powered by logo what ever you feel like but give them some credit!
Also don’t forget that you can have a standard error page by placing the same error page URL into the
.htaccess and just make it generic, Because the
.htaccess file is sitting in the
public_html folder it will still take
404 errors from across your website which means that you don’t have to create another
.htaccess for every directory.
Hope This has explained enough if you have any further questions or queries post them below and I will try and answer them.
Bootstrap and HTML5 Web Developer