Creating Custom Error Pages For Server


Jan 10, 2006
Suprisingly, i did not find the solution when using the search tool.

I have a variety of .shtml pages for the 401-500 error pages, and also the skeleton directory and suspended page.

I wanted these to be universally added to my server so it is default on ever clients account (although they can edit through there ftp).

So i uploaded the files to /root/cpanel3-skel/public_html/ (well only the error files here),
but no joy.

Apparently i need to do something with htaccess so wondered if you could explain to me what and how?


Well-Known Member
May 4, 2004
England, UK

I use the following in .htaccess:

ErrorDocument 404 /location/to/error/file.ext

I'm sure this allows other errors such as 500 etc, but I'm not so sure how the location part works; i.e. whether it allows URLs or just local files.

Hope that helps :)


Well-Known Member
Feb 6, 2004
Put any file you want to be loaded into the public_html directory of new accounts on creationion in here:

The files can include:
your custom error pages in the format errorfilenumber.shtml

robots.txt, favicon.ico (both these files are useful for eliminating stacks of errors in your log files)

the custom index.html and associated image and css files for your welcome page to show their account is now live.

Another file you think suitable for inclusion.

When the account is created these files will be copied to the accounts public_html directory.

If an error occurs then the errorfile.shtml will be called from this directory by default.

If you change the location or the name of the error file like oops.shtml and have it in /public_html/error404/ directory then you must tell the system by way of a .htaccess file where to look.
ErrorDocument 404 /error404/oops.html
Otherwise there is no need for a .htaccess file for error messages.