How do I set up error pages such as ’404: File Not Found’ and ’500: Server Error’ on my site?


The two most common errors are 404 (File Not Found) and 500 (Server Error). If a visitor attempts to visit a page that does not exist, they will get a 404 error.  If the web server is having problems and cannot load the page, the visitor will get a 500 error.

If a visitor has difficulties visiting your site, an error page can give them information they need to find the right page.

You can create 404 and 500 error pages and customise them as needed to provide your visitors with clear information to help them navigate your site.

There are two ways to create and edit the 404 and 500 error pages, either using a CGI script to send the errors to the appropriate error pages, or editing the .htaccess file to send the errors to the pages.

CGI Script:

  1. Log into your eXtend Control Panel
  2. Under ‘CGI Scripts’, click ‘404/500 Error Page’
  3. Make certain the directory is the one you want to install the error pages into
  4. Click ‘Install Now’
  5. This creates 404.html and 500.html in your directory
  6. Edit and customise the 404 and 500 pages through your eXtend Control Panel File Manager

.htaccess File:

  1. Create and upload your own 404.html and 500.html pages to your public_html directory
  2. Create a new or edit your existing .htaccess file, adding these two lines:

ErrorDocument 404 “/404.html”
ErrorDocument 500 “/500.html”

  1. Upload the .htaccess file into the public_html directory

You can also use the .htaccess file method to create error pages for other errors, such as 401 (Unauthorized), 403 (Forbidden), and 504 (Gateway Time-Out).



Article ID: 483
Created On: Tue, Mar 17, 2015 at 3:43 PM
Last Updated On: Thu, Apr 23, 2015 at 12:45 PM

Online URL: https://www.heartinternet.uk/support/article/how-do-i-set-up-error-pages-such-as-404-file-not-found-and-500-server-error-on-my-site.html