How to Create a Custom Error Page in DirectAdmin

Custom error pages allow you to display friendly messages when visitors encounter website errors such as missing pages or access problems.

This guide explains how to create custom error pages in DirectAdmin.


What Are Error Pages?

Error pages appear when visitors encounter problems on your website.

Common examples include:

  • 404 Page Not Found
  • 403 Access Denied
  • 500 Internal Server Error

Custom error pages help:

  • improve visitor experience
  • keep your website looking professional
  • provide useful navigation links

Before You Start

Before creating custom error pages, make sure:

  • You can log into DirectAdmin
  • Your website is active
  • You know which error pages you want to customize

If you have not logged in yet, please see:

  • How to Log Into DirectAdmin

Common Error Types

404 — Page Not Found

Appears when a page does not exist.


403 — Forbidden

Appears when access to a page or folder is denied.


500 — Internal Server Error

Appears when a website or server error occurs.


How to Create a Custom Error Page

Step 1 — Log Into DirectAdmin

Open your browser and visit:  https://cp.yourdomain.co.za   (Replace yourdomain.co.za with your own domain name)

Enter your hosting username and password.


Step 2 — Open Custom Error Pages

From the DirectAdmin dashboard:

Click:  Advanced Features

Then click:  Custom Error Pages


Step 3 — Select the Error Type

Choose the error page you want to customize. Note:  you need to have created hese pages or uploaded them to the public_html folder first, 401.shtml, 403.shtml, 404.shtml, 500.shtml first. else you will be using the default system pages when errors or redirects, etc happen. these files are just comprised of standard html formatting.

Examples:

  • 401  (unauthorised)
  • 403  (forbidden)
  • 404  (not found)
  • 500  (internal server error)

Step 4 — Enter Custom Content

Add your custom message or HTML content.

Example:

 
Sorry, the page you are looking for could not be found.
 

You may also include:

  • your logo
  • navigation links
  • homepage links
  • contact information

Step 5 — Save the Error Page

Click:  Save

The custom error page is now active.


Recommended 404 Page Content

A good 404 page should include:

  • a clear message
  • a homepage link
  • navigation menu
  • contact information
  • branding/logo

This helps visitors continue using your website instead of leaving.


Helpful Tips

Keep Error Pages Simple

Avoid:

  • complicated layouts
  • broken links
  • excessive scripts

Simple pages load faster and are easier to maintain.


Match Your Website Design

Use similar:

  • colours
  • branding
  • navigation
  • fonts

for a more professional appearance.


Include Helpful Links

Useful links may include:

  • homepage
  • contact page
  • support page
  • product pages

Troubleshooting

Custom Error Page Not Showing

Check:

  • browser cache
  • saved changes
  • correct error type selected

Error Page Displays Incorrectly

Possible causes include:

  • broken HTML
  • missing images
  • invalid links
  • incorrect formatting

Website Displays Server Errors

A badly configured custom error page may create:

  • additional server errors
  • recursive error loops

Keep error pages simple if possible.


Changes Not Visible Yet

Try:

  • clearing browser cache
  • testing in private browsing mode
  • refreshing the page

Security Tips

  • Avoid displaying sensitive server information
  • Keep error pages simple and professional
  • Remove broken links regularly
  • Keep website software updated

 

  • website troubleshooting, custom error pages
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Change PHP Version in DirectAdmin

Different websites and applications may require different PHP versions to work correctly. This...

How to Check Disk Usage in DirectAdmin

DirectAdmin allows you to monitor how much disk space your hosting account is using. This guide...

How to Check Which PHP Version Your Website Is Using

Different websites and applications may require different PHP versions....

How to Create a Cron Job in DirectAdmin

Cron Jobs allow your hosting account to run scheduled tasks automatically at specific times or...

How to Suspend a Website Using DirectAdmin

There may be times when you need to temporarily disable access to a website for maintenance,...