• Wednesday, February 25, 2026

Knowledge Base

How to Create Custom Error Pages in DirectAdmin

Custom 404 and Error Pages

Replace default error pages with your own branded versions.

Using DirectAdmin

  1. Log into DirectAdmin
  2. Click Custom Error Pages
  3. Select an error type (e.g., 404 Not Found)
  4. Enter your custom HTML
  5. Click Save

Common Error Codes

  • 400 - Bad Request
  • 401 - Authorization Required
  • 403 - Forbidden
  • 404 - Not Found (most common)
  • 500 - Internal Server Error

Using .htaccess

Add to your .htaccess file:

ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html

Best Practices for 404 Pages

  • Include your site navigation
  • Add a search box
  • Link to your homepage
  • Suggest popular pages
  • Keep your branding consistent
  • Consider adding contact information

Example 404 Page

<h1>Page Not Found</h1>
<p>Sorry, the page you're looking for doesn't exist.</p>
<p><a href="/">Return to Homepage</a></p>